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

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


The following commit(s) were added to refs/heads/master by this push:
     new b6fde72  [Feature-8020][Document] Add example and notice about task 
type SQL (#667)
b6fde72 is described below

commit b6fde72af187257d52a74d1db79a6b190cdffe46
Author: 弘树丶 <[email protected]>
AuthorDate: Mon Feb 14 09:50:13 2022 +0800

    [Feature-8020][Document] Add example and notice about task type SQL (#667)
    
    * [Feature][Document] Add example and notice about task type SQL
    separate usage into multiple sections
    use icon in process definitions page instead of a screenshot
    add an example for one or two simple actual task
    add images for sql task demo and use appropriate language screenshot
    
    * change img only use English screenshot
    use whole screenshot with step number for how to create sql task
    use custom parameters for sql task
    
    * use related path instead of the full path
---
 docs/en-us/2.0.0/user_doc/guide/task/sql.md |  43 +++++++++++++++++++++-------
 docs/en-us/2.0.1/user_doc/guide/task/sql.md |  43 +++++++++++++++++++++-------
 docs/en-us/2.0.2/user_doc/guide/task/sql.md |  43 +++++++++++++++++++++-------
 docs/en-us/2.0.3/user_doc/guide/task/sql.md |  43 +++++++++++++++++++++-------
 docs/en-us/dev/user_doc/guide/task/sql.md   |  43 +++++++++++++++++++++-------
 docs/zh-cn/2.0.0/user_doc/guide/task/sql.md |  43 +++++++++++++++++++++-------
 docs/zh-cn/2.0.1/user_doc/guide/task/sql.md |  43 +++++++++++++++++++++-------
 docs/zh-cn/2.0.2/user_doc/guide/task/sql.md |  43 +++++++++++++++++++++-------
 docs/zh-cn/2.0.3/user_doc/guide/task/sql.md |  43 +++++++++++++++++++++-------
 docs/zh-cn/dev/user_doc/guide/task/sql.md   |  43 +++++++++++++++++++++-------
 img/tasks/demo/hive-result.png              | Bin 0 -> 42629 bytes
 img/tasks/demo/hive-sql.png                 | Bin 0 -> 616744 bytes
 img/tasks/icons/sql.png                     | Bin 0 -> 4794 bytes
 13 files changed, 320 insertions(+), 110 deletions(-)

diff --git a/docs/en-us/2.0.0/user_doc/guide/task/sql.md 
b/docs/en-us/2.0.0/user_doc/guide/task/sql.md
index 1a0fbbf..4cbb582 100644
--- a/docs/en-us/2.0.0/user_doc/guide/task/sql.md
+++ b/docs/en-us/2.0.0/user_doc/guide/task/sql.md
@@ -1,22 +1,43 @@
 # SQL
 
-- Drag in the 
toolbar![PNG](https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png)Task
 node into the drawing board
-- Non-query SQL function: edit non-query SQL task information, select 
non-query for sql type, as shown in the figure below:
- <p align="center">
-  <img src="/img/sql-en.png" width="80%" />
-</p>
+## Overview
 
-- Query SQL function: Edit and query SQL task information, sql type selection 
query, select form or attachment to send mail to the specified recipient, as 
shown in the figure below.
+SQL task, used to connect to database and execute SQL.
 
-<p align="center">
-   <img src="/img/sql-node-en.png" width="80%" />
- </p>
+## create data source
+
+Refer to [Data Source](../datasource/introduction.md)
+
+## Create Task
+
+- Click Project Management-Project Name-Workflow Definition, and click the 
"Create Workflow" button to enter the DAG editing page.
+- Drag <img src="/img/tasks/icons/sql.png" width="25"/> from the toolbar to 
the drawing board.
+
+## Task Parameter
 
 - Data source: select the corresponding data source
 - 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 as form, attachment or form attachment. Non-queries are returned 
without a result set, and are for three types of operations: update, delete, 
and insert.
 - sql parameter: the input parameter format is key1=value1;key2=value2...
 - sql statement: SQL statement
 - UDF function: For data sources of type HIVE, you can refer to UDF functions 
created in the resource center. UDF functions are not supported for other types 
of data sources.
-- Custom parameters: SQL task type, and stored procedure is a custom parameter 
order to set values for the method. The custom parameter type and data type are 
the same as the stored procedure task type. The difference is that the SQL task 
type custom parameter will replace the \${variable} in the SQL statement.
+- Custom parameters: SQL task type, and stored procedure is a custom parameter 
order to set values for the method. The custom parameter type and data type are 
the same as the stored procedure task type. The difference is that the SQL task 
type custom parameter will replace the ${variable} in the SQL statement.
 - Pre-sql: Pre-sql is executed before the sql statement.
-- Post-sql: Post-sql is executed after the sql statement.
\ No newline at end of file
+- Post-sql: Post-sql is executed after the sql statement.
+
+## Task Example
+
+### Create a temporary table in hive and write data
+
+This example creates a temporary table `tmp_hello_world` in hive and write a 
row of data. Before creating a temporary table, we need to ensure that the 
table does not exist, so we will use custom parameters to obtain the time of 
the day as the suffix of the table name every time we run, so that this task 
can run every day. The format of the created table name is: 
`tmp_hello_world_{yyyyMMdd}`.
+
+![hive-sql](/img/tasks/demo/hive-sql.png)
+
+### After running the task successfully, query the results in hive.
+
+Log in to the bigdata cluster and use 'hive' command or 'beeline' or 'JDBC' 
and other methods to connect to the 'Apache Hive' for the query. The query SQL 
is `select * from tmp_hello_world_{yyyyMMdd}`, please replace '{yyyyMMdd}' with 
the date of the running day. The query screenshot is as follows:
+
+![hive-sql](/img/tasks/demo/hive-result.png)
+
+## Notice
+
+Pay attention to the selection of SQL type. If it is an insert operation, you 
need to select "Non Query" type.
\ No newline at end of file
diff --git a/docs/en-us/2.0.1/user_doc/guide/task/sql.md 
b/docs/en-us/2.0.1/user_doc/guide/task/sql.md
index 1a0fbbf..4cbb582 100644
--- a/docs/en-us/2.0.1/user_doc/guide/task/sql.md
+++ b/docs/en-us/2.0.1/user_doc/guide/task/sql.md
@@ -1,22 +1,43 @@
 # SQL
 
-- Drag in the 
toolbar![PNG](https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png)Task
 node into the drawing board
-- Non-query SQL function: edit non-query SQL task information, select 
non-query for sql type, as shown in the figure below:
- <p align="center">
-  <img src="/img/sql-en.png" width="80%" />
-</p>
+## Overview
 
-- Query SQL function: Edit and query SQL task information, sql type selection 
query, select form or attachment to send mail to the specified recipient, as 
shown in the figure below.
+SQL task, used to connect to database and execute SQL.
 
-<p align="center">
-   <img src="/img/sql-node-en.png" width="80%" />
- </p>
+## create data source
+
+Refer to [Data Source](../datasource/introduction.md)
+
+## Create Task
+
+- Click Project Management-Project Name-Workflow Definition, and click the 
"Create Workflow" button to enter the DAG editing page.
+- Drag <img src="/img/tasks/icons/sql.png" width="25"/> from the toolbar to 
the drawing board.
+
+## Task Parameter
 
 - Data source: select the corresponding data source
 - 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 as form, attachment or form attachment. Non-queries are returned 
without a result set, and are for three types of operations: update, delete, 
and insert.
 - sql parameter: the input parameter format is key1=value1;key2=value2...
 - sql statement: SQL statement
 - UDF function: For data sources of type HIVE, you can refer to UDF functions 
created in the resource center. UDF functions are not supported for other types 
of data sources.
-- Custom parameters: SQL task type, and stored procedure is a custom parameter 
order to set values for the method. The custom parameter type and data type are 
the same as the stored procedure task type. The difference is that the SQL task 
type custom parameter will replace the \${variable} in the SQL statement.
+- Custom parameters: SQL task type, and stored procedure is a custom parameter 
order to set values for the method. The custom parameter type and data type are 
the same as the stored procedure task type. The difference is that the SQL task 
type custom parameter will replace the ${variable} in the SQL statement.
 - Pre-sql: Pre-sql is executed before the sql statement.
-- Post-sql: Post-sql is executed after the sql statement.
\ No newline at end of file
+- Post-sql: Post-sql is executed after the sql statement.
+
+## Task Example
+
+### Create a temporary table in hive and write data
+
+This example creates a temporary table `tmp_hello_world` in hive and write a 
row of data. Before creating a temporary table, we need to ensure that the 
table does not exist, so we will use custom parameters to obtain the time of 
the day as the suffix of the table name every time we run, so that this task 
can run every day. The format of the created table name is: 
`tmp_hello_world_{yyyyMMdd}`.
+
+![hive-sql](/img/tasks/demo/hive-sql.png)
+
+### After running the task successfully, query the results in hive.
+
+Log in to the bigdata cluster and use 'hive' command or 'beeline' or 'JDBC' 
and other methods to connect to the 'Apache Hive' for the query. The query SQL 
is `select * from tmp_hello_world_{yyyyMMdd}`, please replace '{yyyyMMdd}' with 
the date of the running day. The query screenshot is as follows:
+
+![hive-sql](/img/tasks/demo/hive-result.png)
+
+## Notice
+
+Pay attention to the selection of SQL type. If it is an insert operation, you 
need to select "Non Query" type.
\ No newline at end of file
diff --git a/docs/en-us/2.0.2/user_doc/guide/task/sql.md 
b/docs/en-us/2.0.2/user_doc/guide/task/sql.md
index 1a0fbbf..4cbb582 100644
--- a/docs/en-us/2.0.2/user_doc/guide/task/sql.md
+++ b/docs/en-us/2.0.2/user_doc/guide/task/sql.md
@@ -1,22 +1,43 @@
 # SQL
 
-- Drag in the 
toolbar![PNG](https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png)Task
 node into the drawing board
-- Non-query SQL function: edit non-query SQL task information, select 
non-query for sql type, as shown in the figure below:
- <p align="center">
-  <img src="/img/sql-en.png" width="80%" />
-</p>
+## Overview
 
-- Query SQL function: Edit and query SQL task information, sql type selection 
query, select form or attachment to send mail to the specified recipient, as 
shown in the figure below.
+SQL task, used to connect to database and execute SQL.
 
-<p align="center">
-   <img src="/img/sql-node-en.png" width="80%" />
- </p>
+## create data source
+
+Refer to [Data Source](../datasource/introduction.md)
+
+## Create Task
+
+- Click Project Management-Project Name-Workflow Definition, and click the 
"Create Workflow" button to enter the DAG editing page.
+- Drag <img src="/img/tasks/icons/sql.png" width="25"/> from the toolbar to 
the drawing board.
+
+## Task Parameter
 
 - Data source: select the corresponding data source
 - 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 as form, attachment or form attachment. Non-queries are returned 
without a result set, and are for three types of operations: update, delete, 
and insert.
 - sql parameter: the input parameter format is key1=value1;key2=value2...
 - sql statement: SQL statement
 - UDF function: For data sources of type HIVE, you can refer to UDF functions 
created in the resource center. UDF functions are not supported for other types 
of data sources.
-- Custom parameters: SQL task type, and stored procedure is a custom parameter 
order to set values for the method. The custom parameter type and data type are 
the same as the stored procedure task type. The difference is that the SQL task 
type custom parameter will replace the \${variable} in the SQL statement.
+- Custom parameters: SQL task type, and stored procedure is a custom parameter 
order to set values for the method. The custom parameter type and data type are 
the same as the stored procedure task type. The difference is that the SQL task 
type custom parameter will replace the ${variable} in the SQL statement.
 - Pre-sql: Pre-sql is executed before the sql statement.
-- Post-sql: Post-sql is executed after the sql statement.
\ No newline at end of file
+- Post-sql: Post-sql is executed after the sql statement.
+
+## Task Example
+
+### Create a temporary table in hive and write data
+
+This example creates a temporary table `tmp_hello_world` in hive and write a 
row of data. Before creating a temporary table, we need to ensure that the 
table does not exist, so we will use custom parameters to obtain the time of 
the day as the suffix of the table name every time we run, so that this task 
can run every day. The format of the created table name is: 
`tmp_hello_world_{yyyyMMdd}`.
+
+![hive-sql](/img/tasks/demo/hive-sql.png)
+
+### After running the task successfully, query the results in hive.
+
+Log in to the bigdata cluster and use 'hive' command or 'beeline' or 'JDBC' 
and other methods to connect to the 'Apache Hive' for the query. The query SQL 
is `select * from tmp_hello_world_{yyyyMMdd}`, please replace '{yyyyMMdd}' with 
the date of the running day. The query screenshot is as follows:
+
+![hive-sql](/img/tasks/demo/hive-result.png)
+
+## Notice
+
+Pay attention to the selection of SQL type. If it is an insert operation, you 
need to select "Non Query" type.
\ No newline at end of file
diff --git a/docs/en-us/2.0.3/user_doc/guide/task/sql.md 
b/docs/en-us/2.0.3/user_doc/guide/task/sql.md
index 1a0fbbf..4cbb582 100644
--- a/docs/en-us/2.0.3/user_doc/guide/task/sql.md
+++ b/docs/en-us/2.0.3/user_doc/guide/task/sql.md
@@ -1,22 +1,43 @@
 # SQL
 
-- Drag in the 
toolbar![PNG](https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png)Task
 node into the drawing board
-- Non-query SQL function: edit non-query SQL task information, select 
non-query for sql type, as shown in the figure below:
- <p align="center">
-  <img src="/img/sql-en.png" width="80%" />
-</p>
+## Overview
 
-- Query SQL function: Edit and query SQL task information, sql type selection 
query, select form or attachment to send mail to the specified recipient, as 
shown in the figure below.
+SQL task, used to connect to database and execute SQL.
 
-<p align="center">
-   <img src="/img/sql-node-en.png" width="80%" />
- </p>
+## create data source
+
+Refer to [Data Source](../datasource/introduction.md)
+
+## Create Task
+
+- Click Project Management-Project Name-Workflow Definition, and click the 
"Create Workflow" button to enter the DAG editing page.
+- Drag <img src="/img/tasks/icons/sql.png" width="25"/> from the toolbar to 
the drawing board.
+
+## Task Parameter
 
 - Data source: select the corresponding data source
 - 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 as form, attachment or form attachment. Non-queries are returned 
without a result set, and are for three types of operations: update, delete, 
and insert.
 - sql parameter: the input parameter format is key1=value1;key2=value2...
 - sql statement: SQL statement
 - UDF function: For data sources of type HIVE, you can refer to UDF functions 
created in the resource center. UDF functions are not supported for other types 
of data sources.
-- Custom parameters: SQL task type, and stored procedure is a custom parameter 
order to set values for the method. The custom parameter type and data type are 
the same as the stored procedure task type. The difference is that the SQL task 
type custom parameter will replace the \${variable} in the SQL statement.
+- Custom parameters: SQL task type, and stored procedure is a custom parameter 
order to set values for the method. The custom parameter type and data type are 
the same as the stored procedure task type. The difference is that the SQL task 
type custom parameter will replace the ${variable} in the SQL statement.
 - Pre-sql: Pre-sql is executed before the sql statement.
-- Post-sql: Post-sql is executed after the sql statement.
\ No newline at end of file
+- Post-sql: Post-sql is executed after the sql statement.
+
+## Task Example
+
+### Create a temporary table in hive and write data
+
+This example creates a temporary table `tmp_hello_world` in hive and write a 
row of data. Before creating a temporary table, we need to ensure that the 
table does not exist, so we will use custom parameters to obtain the time of 
the day as the suffix of the table name every time we run, so that this task 
can run every day. The format of the created table name is: 
`tmp_hello_world_{yyyyMMdd}`.
+
+![hive-sql](/img/tasks/demo/hive-sql.png)
+
+### After running the task successfully, query the results in hive.
+
+Log in to the bigdata cluster and use 'hive' command or 'beeline' or 'JDBC' 
and other methods to connect to the 'Apache Hive' for the query. The query SQL 
is `select * from tmp_hello_world_{yyyyMMdd}`, please replace '{yyyyMMdd}' with 
the date of the running day. The query screenshot is as follows:
+
+![hive-sql](/img/tasks/demo/hive-result.png)
+
+## Notice
+
+Pay attention to the selection of SQL type. If it is an insert operation, you 
need to select "Non Query" type.
\ No newline at end of file
diff --git a/docs/en-us/dev/user_doc/guide/task/sql.md 
b/docs/en-us/dev/user_doc/guide/task/sql.md
index 1a0fbbf..4cbb582 100644
--- a/docs/en-us/dev/user_doc/guide/task/sql.md
+++ b/docs/en-us/dev/user_doc/guide/task/sql.md
@@ -1,22 +1,43 @@
 # SQL
 
-- Drag in the 
toolbar![PNG](https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png)Task
 node into the drawing board
-- Non-query SQL function: edit non-query SQL task information, select 
non-query for sql type, as shown in the figure below:
- <p align="center">
-  <img src="/img/sql-en.png" width="80%" />
-</p>
+## Overview
 
-- Query SQL function: Edit and query SQL task information, sql type selection 
query, select form or attachment to send mail to the specified recipient, as 
shown in the figure below.
+SQL task, used to connect to database and execute SQL.
 
-<p align="center">
-   <img src="/img/sql-node-en.png" width="80%" />
- </p>
+## create data source
+
+Refer to [Data Source](../datasource/introduction.md)
+
+## Create Task
+
+- Click Project Management-Project Name-Workflow Definition, and click the 
"Create Workflow" button to enter the DAG editing page.
+- Drag <img src="/img/tasks/icons/sql.png" width="25"/> from the toolbar to 
the drawing board.
+
+## Task Parameter
 
 - Data source: select the corresponding data source
 - 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 as form, attachment or form attachment. Non-queries are returned 
without a result set, and are for three types of operations: update, delete, 
and insert.
 - sql parameter: the input parameter format is key1=value1;key2=value2...
 - sql statement: SQL statement
 - UDF function: For data sources of type HIVE, you can refer to UDF functions 
created in the resource center. UDF functions are not supported for other types 
of data sources.
-- Custom parameters: SQL task type, and stored procedure is a custom parameter 
order to set values for the method. The custom parameter type and data type are 
the same as the stored procedure task type. The difference is that the SQL task 
type custom parameter will replace the \${variable} in the SQL statement.
+- Custom parameters: SQL task type, and stored procedure is a custom parameter 
order to set values for the method. The custom parameter type and data type are 
the same as the stored procedure task type. The difference is that the SQL task 
type custom parameter will replace the ${variable} in the SQL statement.
 - Pre-sql: Pre-sql is executed before the sql statement.
-- Post-sql: Post-sql is executed after the sql statement.
\ No newline at end of file
+- Post-sql: Post-sql is executed after the sql statement.
+
+## Task Example
+
+### Create a temporary table in hive and write data
+
+This example creates a temporary table `tmp_hello_world` in hive and write a 
row of data. Before creating a temporary table, we need to ensure that the 
table does not exist, so we will use custom parameters to obtain the time of 
the day as the suffix of the table name every time we run, so that this task 
can run every day. The format of the created table name is: 
`tmp_hello_world_{yyyyMMdd}`.
+
+![hive-sql](/img/tasks/demo/hive-sql.png)
+
+### After running the task successfully, query the results in hive.
+
+Log in to the bigdata cluster and use 'hive' command or 'beeline' or 'JDBC' 
and other methods to connect to the 'Apache Hive' for the query. The query SQL 
is `select * from tmp_hello_world_{yyyyMMdd}`, please replace '{yyyyMMdd}' with 
the date of the running day. The query screenshot is as follows:
+
+![hive-sql](/img/tasks/demo/hive-result.png)
+
+## Notice
+
+Pay attention to the selection of SQL type. If it is an insert operation, you 
need to select "Non Query" type.
\ No newline at end of file
diff --git a/docs/zh-cn/2.0.0/user_doc/guide/task/sql.md 
b/docs/zh-cn/2.0.0/user_doc/guide/task/sql.md
index e05cc47..48e8cb4 100644
--- a/docs/zh-cn/2.0.0/user_doc/guide/task/sql.md
+++ b/docs/zh-cn/2.0.0/user_doc/guide/task/sql.md
@@ -1,22 +1,43 @@
-# SQL节点
+# SQL
 
-- 
拖动工具栏中的![PNG](https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png)任务节点到画板中
-- 非查询SQL功能:编辑非查询SQL任务信息,sql类型选择非查询,如下图所示:
-  <p align="center">
-   <img src="/img/sql-node.png" width="80%" />
- </p>
+## 综述
 
-- 查询SQL功能:编辑查询SQL任务信息,sql类型选择查询,选择表格或附件形式发送邮件到指定的收件人,如下图所示。
+SQL任务类型,用于连接数据库并执行相应SQL。
 
-<p align="center">
-   <img src="/img/sql-node2.png" width="80%" />
- </p>
+## 创建数据源
+
+可参考[数据源中心介绍](../datasource/introduction.md)。
+
+## 创建任务
+
+- 点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。
+- 工具栏中拖动 <img src="/img/tasks/icons/sql.png" width="25"/> 
到画板中,选择需要连接的数据源,即可完成创建。
+
+## 任务参数
 
 - 数据源:选择对应的数据源
 - 
sql类型:支持查询和非查询两种,查询是select类型的查询,是有结果集返回的,可以指定邮件通知为表格、附件或表格附件三种模板。非查询是没有结果集返回的,是针对update、delete、insert三种类型的操作。
 - sql参数:输入参数格式为key1=value1;key2=value2…
 - sql语句:SQL语句
-- UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。
+- UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。
 - 
自定义参数:SQL任务类型,而存储过程是自定义参数顺序的给方法设置值自定义参数类型和数据类型同存储过程任务类型一样。区别在于SQL任务类型自定义参数会替换sql语句中${变量}。
 - 前置sql:前置sql在sql语句之前执行。
 - 后置sql:后置sql在sql语句之后执行。
+
+## 任务样例
+
+### 在hive中创建临时表并写入数据
+
+该样例向hive中创建临时表`tmp_hello_world`并写入一行数据。选择SQL类型为非查询,在创建临时表之前需要确保该表不存在,所以我们使用自定义参数,在每次运行时获取当天时间作为表名后缀,这样这个任务就可以每天运行。创建的表名格式为:`tmp_hello_world_{yyyyMMdd}`。
+
+![hive-sql](/img/tasks/demo/hive-sql.png)
+
+### 运行该任务成功之后在hive中查询结果
+
+登录集群使用`hive`命令或使用`beeline`、`JDBC`等方式连接`apache hive`进行查询,查询SQL为`select * from 
tmp_hello_world_{yyyyMMdd}`,请将`{yyyyMMdd}`替换为运行当天的日期,查询截图如下:
+
+![hive-sql](/img/tasks/demo/hive-result.png)
+
+## 注意事项
+
+注意SQL类型的选择,如果是INSERT等操作需要选择非查询类型。
\ No newline at end of file
diff --git a/docs/zh-cn/2.0.1/user_doc/guide/task/sql.md 
b/docs/zh-cn/2.0.1/user_doc/guide/task/sql.md
index e05cc47..48e8cb4 100644
--- a/docs/zh-cn/2.0.1/user_doc/guide/task/sql.md
+++ b/docs/zh-cn/2.0.1/user_doc/guide/task/sql.md
@@ -1,22 +1,43 @@
-# SQL节点
+# SQL
 
-- 
拖动工具栏中的![PNG](https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png)任务节点到画板中
-- 非查询SQL功能:编辑非查询SQL任务信息,sql类型选择非查询,如下图所示:
-  <p align="center">
-   <img src="/img/sql-node.png" width="80%" />
- </p>
+## 综述
 
-- 查询SQL功能:编辑查询SQL任务信息,sql类型选择查询,选择表格或附件形式发送邮件到指定的收件人,如下图所示。
+SQL任务类型,用于连接数据库并执行相应SQL。
 
-<p align="center">
-   <img src="/img/sql-node2.png" width="80%" />
- </p>
+## 创建数据源
+
+可参考[数据源中心介绍](../datasource/introduction.md)。
+
+## 创建任务
+
+- 点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。
+- 工具栏中拖动 <img src="/img/tasks/icons/sql.png" width="25"/> 
到画板中,选择需要连接的数据源,即可完成创建。
+
+## 任务参数
 
 - 数据源:选择对应的数据源
 - 
sql类型:支持查询和非查询两种,查询是select类型的查询,是有结果集返回的,可以指定邮件通知为表格、附件或表格附件三种模板。非查询是没有结果集返回的,是针对update、delete、insert三种类型的操作。
 - sql参数:输入参数格式为key1=value1;key2=value2…
 - sql语句:SQL语句
-- UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。
+- UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。
 - 
自定义参数:SQL任务类型,而存储过程是自定义参数顺序的给方法设置值自定义参数类型和数据类型同存储过程任务类型一样。区别在于SQL任务类型自定义参数会替换sql语句中${变量}。
 - 前置sql:前置sql在sql语句之前执行。
 - 后置sql:后置sql在sql语句之后执行。
+
+## 任务样例
+
+### 在hive中创建临时表并写入数据
+
+该样例向hive中创建临时表`tmp_hello_world`并写入一行数据。选择SQL类型为非查询,在创建临时表之前需要确保该表不存在,所以我们使用自定义参数,在每次运行时获取当天时间作为表名后缀,这样这个任务就可以每天运行。创建的表名格式为:`tmp_hello_world_{yyyyMMdd}`。
+
+![hive-sql](/img/tasks/demo/hive-sql.png)
+
+### 运行该任务成功之后在hive中查询结果
+
+登录集群使用`hive`命令或使用`beeline`、`JDBC`等方式连接`apache hive`进行查询,查询SQL为`select * from 
tmp_hello_world_{yyyyMMdd}`,请将`{yyyyMMdd}`替换为运行当天的日期,查询截图如下:
+
+![hive-sql](/img/tasks/demo/hive-result.png)
+
+## 注意事项
+
+注意SQL类型的选择,如果是INSERT等操作需要选择非查询类型。
\ No newline at end of file
diff --git a/docs/zh-cn/2.0.2/user_doc/guide/task/sql.md 
b/docs/zh-cn/2.0.2/user_doc/guide/task/sql.md
index e05cc47..48e8cb4 100644
--- a/docs/zh-cn/2.0.2/user_doc/guide/task/sql.md
+++ b/docs/zh-cn/2.0.2/user_doc/guide/task/sql.md
@@ -1,22 +1,43 @@
-# SQL节点
+# SQL
 
-- 
拖动工具栏中的![PNG](https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png)任务节点到画板中
-- 非查询SQL功能:编辑非查询SQL任务信息,sql类型选择非查询,如下图所示:
-  <p align="center">
-   <img src="/img/sql-node.png" width="80%" />
- </p>
+## 综述
 
-- 查询SQL功能:编辑查询SQL任务信息,sql类型选择查询,选择表格或附件形式发送邮件到指定的收件人,如下图所示。
+SQL任务类型,用于连接数据库并执行相应SQL。
 
-<p align="center">
-   <img src="/img/sql-node2.png" width="80%" />
- </p>
+## 创建数据源
+
+可参考[数据源中心介绍](../datasource/introduction.md)。
+
+## 创建任务
+
+- 点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。
+- 工具栏中拖动 <img src="/img/tasks/icons/sql.png" width="25"/> 
到画板中,选择需要连接的数据源,即可完成创建。
+
+## 任务参数
 
 - 数据源:选择对应的数据源
 - 
sql类型:支持查询和非查询两种,查询是select类型的查询,是有结果集返回的,可以指定邮件通知为表格、附件或表格附件三种模板。非查询是没有结果集返回的,是针对update、delete、insert三种类型的操作。
 - sql参数:输入参数格式为key1=value1;key2=value2…
 - sql语句:SQL语句
-- UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。
+- UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。
 - 
自定义参数:SQL任务类型,而存储过程是自定义参数顺序的给方法设置值自定义参数类型和数据类型同存储过程任务类型一样。区别在于SQL任务类型自定义参数会替换sql语句中${变量}。
 - 前置sql:前置sql在sql语句之前执行。
 - 后置sql:后置sql在sql语句之后执行。
+
+## 任务样例
+
+### 在hive中创建临时表并写入数据
+
+该样例向hive中创建临时表`tmp_hello_world`并写入一行数据。选择SQL类型为非查询,在创建临时表之前需要确保该表不存在,所以我们使用自定义参数,在每次运行时获取当天时间作为表名后缀,这样这个任务就可以每天运行。创建的表名格式为:`tmp_hello_world_{yyyyMMdd}`。
+
+![hive-sql](/img/tasks/demo/hive-sql.png)
+
+### 运行该任务成功之后在hive中查询结果
+
+登录集群使用`hive`命令或使用`beeline`、`JDBC`等方式连接`apache hive`进行查询,查询SQL为`select * from 
tmp_hello_world_{yyyyMMdd}`,请将`{yyyyMMdd}`替换为运行当天的日期,查询截图如下:
+
+![hive-sql](/img/tasks/demo/hive-result.png)
+
+## 注意事项
+
+注意SQL类型的选择,如果是INSERT等操作需要选择非查询类型。
\ No newline at end of file
diff --git a/docs/zh-cn/2.0.3/user_doc/guide/task/sql.md 
b/docs/zh-cn/2.0.3/user_doc/guide/task/sql.md
index e05cc47..48e8cb4 100644
--- a/docs/zh-cn/2.0.3/user_doc/guide/task/sql.md
+++ b/docs/zh-cn/2.0.3/user_doc/guide/task/sql.md
@@ -1,22 +1,43 @@
-# SQL节点
+# SQL
 
-- 
拖动工具栏中的![PNG](https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png)任务节点到画板中
-- 非查询SQL功能:编辑非查询SQL任务信息,sql类型选择非查询,如下图所示:
-  <p align="center">
-   <img src="/img/sql-node.png" width="80%" />
- </p>
+## 综述
 
-- 查询SQL功能:编辑查询SQL任务信息,sql类型选择查询,选择表格或附件形式发送邮件到指定的收件人,如下图所示。
+SQL任务类型,用于连接数据库并执行相应SQL。
 
-<p align="center">
-   <img src="/img/sql-node2.png" width="80%" />
- </p>
+## 创建数据源
+
+可参考[数据源中心介绍](../datasource/introduction.md)。
+
+## 创建任务
+
+- 点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。
+- 工具栏中拖动 <img src="/img/tasks/icons/sql.png" width="25"/> 
到画板中,选择需要连接的数据源,即可完成创建。
+
+## 任务参数
 
 - 数据源:选择对应的数据源
 - 
sql类型:支持查询和非查询两种,查询是select类型的查询,是有结果集返回的,可以指定邮件通知为表格、附件或表格附件三种模板。非查询是没有结果集返回的,是针对update、delete、insert三种类型的操作。
 - sql参数:输入参数格式为key1=value1;key2=value2…
 - sql语句:SQL语句
-- UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。
+- UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。
 - 
自定义参数:SQL任务类型,而存储过程是自定义参数顺序的给方法设置值自定义参数类型和数据类型同存储过程任务类型一样。区别在于SQL任务类型自定义参数会替换sql语句中${变量}。
 - 前置sql:前置sql在sql语句之前执行。
 - 后置sql:后置sql在sql语句之后执行。
+
+## 任务样例
+
+### 在hive中创建临时表并写入数据
+
+该样例向hive中创建临时表`tmp_hello_world`并写入一行数据。选择SQL类型为非查询,在创建临时表之前需要确保该表不存在,所以我们使用自定义参数,在每次运行时获取当天时间作为表名后缀,这样这个任务就可以每天运行。创建的表名格式为:`tmp_hello_world_{yyyyMMdd}`。
+
+![hive-sql](/img/tasks/demo/hive-sql.png)
+
+### 运行该任务成功之后在hive中查询结果
+
+登录集群使用`hive`命令或使用`beeline`、`JDBC`等方式连接`apache hive`进行查询,查询SQL为`select * from 
tmp_hello_world_{yyyyMMdd}`,请将`{yyyyMMdd}`替换为运行当天的日期,查询截图如下:
+
+![hive-sql](/img/tasks/demo/hive-result.png)
+
+## 注意事项
+
+注意SQL类型的选择,如果是INSERT等操作需要选择非查询类型。
\ No newline at end of file
diff --git a/docs/zh-cn/dev/user_doc/guide/task/sql.md 
b/docs/zh-cn/dev/user_doc/guide/task/sql.md
index e05cc47..48e8cb4 100644
--- a/docs/zh-cn/dev/user_doc/guide/task/sql.md
+++ b/docs/zh-cn/dev/user_doc/guide/task/sql.md
@@ -1,22 +1,43 @@
-# SQL节点
+# SQL
 
-- 
拖动工具栏中的![PNG](https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png)任务节点到画板中
-- 非查询SQL功能:编辑非查询SQL任务信息,sql类型选择非查询,如下图所示:
-  <p align="center">
-   <img src="/img/sql-node.png" width="80%" />
- </p>
+## 综述
 
-- 查询SQL功能:编辑查询SQL任务信息,sql类型选择查询,选择表格或附件形式发送邮件到指定的收件人,如下图所示。
+SQL任务类型,用于连接数据库并执行相应SQL。
 
-<p align="center">
-   <img src="/img/sql-node2.png" width="80%" />
- </p>
+## 创建数据源
+
+可参考[数据源中心介绍](../datasource/introduction.md)。
+
+## 创建任务
+
+- 点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。
+- 工具栏中拖动 <img src="/img/tasks/icons/sql.png" width="25"/> 
到画板中,选择需要连接的数据源,即可完成创建。
+
+## 任务参数
 
 - 数据源:选择对应的数据源
 - 
sql类型:支持查询和非查询两种,查询是select类型的查询,是有结果集返回的,可以指定邮件通知为表格、附件或表格附件三种模板。非查询是没有结果集返回的,是针对update、delete、insert三种类型的操作。
 - sql参数:输入参数格式为key1=value1;key2=value2…
 - sql语句:SQL语句
-- UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。
+- UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。
 - 
自定义参数:SQL任务类型,而存储过程是自定义参数顺序的给方法设置值自定义参数类型和数据类型同存储过程任务类型一样。区别在于SQL任务类型自定义参数会替换sql语句中${变量}。
 - 前置sql:前置sql在sql语句之前执行。
 - 后置sql:后置sql在sql语句之后执行。
+
+## 任务样例
+
+### 在hive中创建临时表并写入数据
+
+该样例向hive中创建临时表`tmp_hello_world`并写入一行数据。选择SQL类型为非查询,在创建临时表之前需要确保该表不存在,所以我们使用自定义参数,在每次运行时获取当天时间作为表名后缀,这样这个任务就可以每天运行。创建的表名格式为:`tmp_hello_world_{yyyyMMdd}`。
+
+![hive-sql](/img/tasks/demo/hive-sql.png)
+
+### 运行该任务成功之后在hive中查询结果
+
+登录集群使用`hive`命令或使用`beeline`、`JDBC`等方式连接`apache hive`进行查询,查询SQL为`select * from 
tmp_hello_world_{yyyyMMdd}`,请将`{yyyyMMdd}`替换为运行当天的日期,查询截图如下:
+
+![hive-sql](/img/tasks/demo/hive-result.png)
+
+## 注意事项
+
+注意SQL类型的选择,如果是INSERT等操作需要选择非查询类型。
\ No newline at end of file
diff --git a/img/tasks/demo/hive-result.png b/img/tasks/demo/hive-result.png
new file mode 100644
index 0000000..77fa742
Binary files /dev/null and b/img/tasks/demo/hive-result.png differ
diff --git a/img/tasks/demo/hive-sql.png b/img/tasks/demo/hive-sql.png
new file mode 100644
index 0000000..415780a
Binary files /dev/null and b/img/tasks/demo/hive-sql.png differ
diff --git a/img/tasks/icons/sql.png b/img/tasks/icons/sql.png
new file mode 100644
index 0000000..6292309
Binary files /dev/null and b/img/tasks/icons/sql.png differ

Reply via email to