Skip to content

[Improvement][SQL component] support multiple lines of sql #4465

@ntupapaya

Description

@ntupapaya

Describe the question
现在sql组件值只支持单条sql,但希望支持多条(通过例如分号分割)

What are the current deficiencies and the benefits of improvement
这里应用场景是说,当sql比较多且联系紧密不可分割的时候,不见得希望每条sql一个流程节点。会过于繁琐。至少在开发阶段希望一起执行和测试。测完了基本功能可以考虑进行适当拆分成多个节点,但也未必到这么细的粒度。

Which version of DolphinScheduler:
-[1.3.4]

Describe alternatives you've considered
虽然群里答复说:
"不支持啊, 因为jdbc只能执行一条sql, 如果是多个sql的话,没有办法做到精确拆分.
举例,以分号拆分";" 如果sql里面有注释, 注释里面包含分号";" 这个不是很好处理.
而且有的sql是按照 换行拆分的并不是按照sql拆分的.
这个你可以提个issue , 看看咋处理...
hive的话,推荐使用 shell 节点. hive -e 执行....
"
但是,

  1. 相比直接不支持多行,可以不支持注释,或者不支持注释里有分号,这都可以作为限制,不校验都行,反正写错了运行时就报错呗。
  2. shell组件毕竟有一些不便。否则sql组件本身就没有存在的意义了

Metadata

Metadata

Assignees

No one assigned

    Labels

    Staleimprovementmake more easy to user or prompt friendly

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions