[Feature-8020][Document] Add example and notice about task type SQL#667
[Feature-8020][Document] Add example and notice about task type SQL#667zhongjiajie merged 3 commits intoapache:masterfrom
Conversation
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
This comment was marked as resolved.
This comment was marked as resolved.
|
I am going to see tonight |
| </p> | ||
| ## 创建数据源 | ||
|
|
||
| - 点击数据源中心的“创建数据源”按钮,输入连接信息并测试连接。 |
There was a problem hiding this comment.
If there are just one point in the list, maybe we can just remove the list.
BTW, could we use the hyperlink to how to add data sources?
| - 点击数据源中心的“创建数据源”按钮,输入连接信息并测试连接。 | |
| 点击数据源中心的“创建数据源”按钮,输入连接信息并测试连接。 |
| ## 创建任务 | ||
|
|
||
| - 点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。 | ||
| - 工具栏中拖动 <img src="/img/tasks/demo/sql-icon.png" width="25"/> 到画板中,选择需要连接的数据源,即可完成创建。 |
There was a problem hiding this comment.
we have a specific directory to keep all tasks icon
| - 工具栏中拖动 <img src="/img/tasks/demo/sql-icon.png" width="25"/> 到画板中,选择需要连接的数据源,即可完成创建。 | |
| - 工具栏中拖动 <img src="/img/tasks/icon/sql.png" width="25"/> 到画板中,选择需要连接的数据源,即可完成创建。 |
|
|
||
| 该样例向hive中创建临时表`tmp_hello_world`并写入一行数据。选择SQL类型为非查询,在创建临时表之前需要确保该表不存在,所以会用到SQL任务中“前置sql”的功能,在“sql语句”执行之前将该表删除。 | ||
|
|
||
| <img src="/img/tasks/demo/hive-sql-zh.png" alt="hive-sql-zh" style="zoom:80%;" /> |
There was a problem hiding this comment.
Please use markdown syntax instead of html syntax. besides, we could only use English version pictures in both English and Chinese versions documents.
| <img src="/img/tasks/demo/hive-sql-zh.png" alt="hive-sql-zh" style="zoom:80%;" /> | |
|  |
|
|
||
| 运行该任务成功之后在hive中查询结果 | ||
|
|
||
| <img src="/img/tasks/demo/hive-result.png" alt="hive-result" style="zoom:80%;" /> |
|
|
||
| <img src="/img/tasks/demo/hive-sql-zh.png" alt="hive-sql-zh" style="zoom:80%;" /> | ||
|
|
||
| 运行该任务成功之后在hive中查询结果 |
There was a problem hiding this comment.
Maybe we should add more detail about how to query the result. I think point out user go to hive cli or beeline to query results in good way, due to DolphinScheduler do not have ad-hoc mechanism, WDYT
|
|
||
| 该样例向hive中创建临时表`tmp_hello_world`并写入一行数据。选择SQL类型为非查询,在创建临时表之前需要确保该表不存在,所以会用到SQL任务中“前置sql”的功能,在“sql语句”执行之前将该表删除。 | ||
|
|
||
| <img src="/img/tasks/demo/hive-sql-zh.png" alt="hive-sql-zh" style="zoom:80%;" /> |
There was a problem hiding this comment.
BTW, do you mind use whole screenshot with step number for how to create sql task? just like https://github.com/apache/dolphinscheduler-website/blob/7ec0cc27c2701b635a2296b141cc446a2da4e19d/img/tasks/demo/shell.jpg did?
| ## 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 remote database and execute SQL. |
There was a problem hiding this comment.
I think maybe we could remove keyword remote, just database because it could connect local DB, WDYT
| SQL task, used to connect to remote database and execute SQL. | |
| SQL task, used to connect to database and execute SQL. |
|
About the example of how to create tables, I thinks is better to make our example could run directly, could we use parameter in the table name, like |
|
copy that, I will submit the update in a few days. |
use whole screenshot with step number for how to create sql task use custom parameters for sql task
|
@zhongjiajie hi, I have submitted an update, and i'm sorry I accidentally removed assignment in apache/dolphinscheduler#8020, could you reassin this issue to me |
This comment was marked as resolved.
This comment was marked as resolved.
|
Thanks for the feedback, I restart the CI |
| </p> | ||
| ## create data source | ||
|
|
||
| Refer to [Data Source](https://dolphinscheduler.apache.org/en-us/docs/latest/user_doc/guide/datasource/introduction.html) |
There was a problem hiding this comment.
We should use a related path instead of the full path with a fixable version, in this case, we should use syntax [Data Source](../datasource/introduction.md)
There was a problem hiding this comment.
So as others change, others LGTM
|
Hi @hongshuboy I add some suggestion above, PTAL |
|
@zhongjiajie hi, TBR |
|
I accidentally removed assignment in apache/dolphinscheduler#8020, could you reassin this issue to me |

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
close: apache/dolphinscheduler#8020