You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by zh...@apache.org on 2022/05/16 12:18:21 UTC

[dolphinscheduler] 03/15: [doc] Add the description about execute type in SQL task (#9987)

This is an automated email from the ASF dual-hosted git repository.

zhongjiajie pushed a commit to branch 3.0.0-beta-prepare
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git

commit 0da0613a1bbea99b05103c788b913dcb1defb34a
Author: Kerwin <37...@users.noreply.github.com>
AuthorDate: Thu May 12 14:42:39 2022 +0800

    [doc] Add the description about execute type in SQL task (#9987)
    
    
    (cherry picked from commit bce5a284409e13d477c2f21b40a0db7c895e63f0)
---
 docs/docs/en/guide/task/sql.md | 7 ++++++-
 docs/docs/zh/guide/task/sql.md | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/docs/docs/en/guide/task/sql.md b/docs/docs/en/guide/task/sql.md
index 9c62245169..f40893ff22 100644
--- a/docs/docs/en/guide/task/sql.md
+++ b/docs/docs/en/guide/task/sql.md
@@ -16,7 +16,12 @@ Refer to [DataSource](../datasource/introduction.md)
 ## Task Parameter
 
 - Data source: Select the corresponding DataSource.
-- SQL type: Supports query and non-query. The query is a `select` type query, which is returned with a result set. You can specify three templates for email notification: form, attachment or form attachment. Non-queries return without a result set, three types of operations are: update, delete and insert.
+- SQL type: Supports query and non-query. 
+  - Query: supports `DML select` type commands, which return a result set. You can specify three templates for email notification as form, attachment or form attachment;
+  - Non-query: support `DDL` all commands and `DML update, delete, insert` three types of commands;
+    - Segmented execution symbol: When the data source does not support executing multiple SQL statements at a time, the symbol for splitting SQL statements is provided to call the data source execution method multiple times.
+    Example: 1. When the Hive data source is selected as the data source, this parameter does not need to be filled in. Because the Hive data source itself supports executing multiple SQL statements at one time;
+             2. When the MySQL data source is selected as the data source, and multi-segment SQL statements are to be executed, this parameter needs to be filled in with a semicolon `;`. Because the MySQL data source does not support executing multiple SQL statements at one time;
 - SQL parameter: The input parameter format is `key1=value1;key2=value2...`.
 - SQL statement: SQL statement.
 - UDF function: For Hive DataSources, you can refer to UDF functions created in the resource center, but other DataSource do not support UDF functions.
diff --git a/docs/docs/zh/guide/task/sql.md b/docs/docs/zh/guide/task/sql.md
index 0c1c673356..4896e80bf9 100644
--- a/docs/docs/zh/guide/task/sql.md
+++ b/docs/docs/zh/guide/task/sql.md
@@ -16,7 +16,12 @@ SQL任务类型,用于连接数据库并执行相应SQL。
 ## 任务参数
 
 - 数据源:选择对应的数据源
-- sql类型:支持查询和非查询两种,查询是select类型的查询,是有结果集返回的,可以指定邮件通知为表格、附件或表格附件三种模板。非查询是没有结果集返回的,是针对update、delete、insert三种类型的操作。
+- sql类型:支持查询和非查询两种。
+  - 查询:支持 `DML select` 类型的命令,是有结果集返回的,可以指定邮件通知为表格、附件或表格附件三种模板;
+  - 非查询:支持 `DDL`全部命令 和 `DML update、delete、insert` 三种类型的命令;
+    - 分段执行符号:提供在数据源不支持一次执行多段SQL语句时,拆分SQL语句的符号来进行多次调用数据源执行方法。
+    例子:1.当数据源选择Hive数据源时,不需要填写此参数。因为Hive数据源本身支持一次执行多段SQL语句;
+         2.当数据源选择MySQL数据源时,并且要执行多段SQL语句时,需要填写此参数为分号 `;`。因为MySQL数据源不支持一次执行多段SQL语句;
 - sql参数:输入参数格式为key1=value1;key2=value2…
 - sql语句:SQL语句
 - UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。