Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature-8020][Document] Add example and notice about task type SQL #667

Merged
merged 3 commits into from Feb 14, 2022

Conversation

hongshuboy
Copy link
Contributor

@hongshuboy hongshuboy commented Feb 3, 2022

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

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
@hongshuboy
Copy link
Contributor Author

@hongshuboy

This comment was marked as resolved.

@zhongjiajie
Copy link
Member

I am going to see tonight

@zhongjiajie zhongjiajie added the waiting for review Waiting review from reviewer label Feb 7, 2022
Copy link
Member

@zhongjiajie zhongjiajie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I add some suggestions based on dev Chinese version, it has the same problem as others. PTAL if you have time

</p>
## 创建数据源

- 点击数据源中心的“创建数据源”按钮,输入连接信息并测试连接。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Suggested change
- 点击数据源中心的“创建数据源”按钮,输入连接信息并测试连接。
点击数据源中心的“创建数据源”按钮,输入连接信息并测试连接。

## 创建任务

- 点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。
- 工具栏中拖动 <img src="/img/tasks/demo/sql-icon.png" width="25"/> 到画板中,选择需要连接的数据源,即可完成创建。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have a specific directory to keep all tasks icon

Suggested change
- 工具栏中拖动 <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%;" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use markdown syntax instead of html syntax. besides, we could only use English version pictures in both English and Chinese versions documents.

Suggested change
<img src="/img/tasks/demo/hive-sql-zh.png" alt="hive-sql-zh" style="zoom:80%;" />
![hive-sql](/img/tasks/demo/hive-sql.png)


运行该任务成功之后在hive中查询结果

<img src="/img/tasks/demo/hive-result.png" alt="hive-result" style="zoom:80%;" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use markdown syntax


<img src="/img/tasks/demo/hive-sql-zh.png" alt="hive-sql-zh" style="zoom:80%;" />

运行该任务成功之后在hive中查询结果
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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%;" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?


- 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think maybe we could remove keyword remote, just database because it could connect local DB, WDYT

Suggested change
SQL task, used to connect to remote database and execute SQL.
SQL task, used to connect to database and execute SQL.

@zhongjiajie zhongjiajie added waiting user response Waiting PR submiter response First-time contributor and removed waiting for review Waiting review from reviewer labels Feb 7, 2022
@zhongjiajie
Copy link
Member

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 tmp_hello_world_${current_time} to make sure table not exists

@zhongjiajie
Copy link
Member

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 tmp_hello_world_${current_time} to make sure table not exists

I mean, just like below.
image

@hongshuboy
Copy link
Contributor Author

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
@hongshuboy
Copy link
Contributor Author

@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

@hongshuboy

This comment was marked as resolved.

@zhongjiajie zhongjiajie added waiting for review Waiting review from reviewer and removed waiting user response Waiting PR submiter response labels Feb 13, 2022
@zhongjiajie
Copy link
Member

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So as others change, others LGTM

@zhongjiajie
Copy link
Member

Hi @hongshuboy I add some suggestion above, PTAL

@hongshuboy
Copy link
Contributor Author

hongshuboy commented Feb 13, 2022

@zhongjiajie hi, TBR

@hongshuboy
Copy link
Contributor Author

I accidentally removed assignment in apache/dolphinscheduler#8020, could you reassin this issue to me

Copy link
Member

@zhongjiajie zhongjiajie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@zhongjiajie zhongjiajie merged commit b6fde72 into apache:master Feb 14, 2022
@hongshuboy hongshuboy deleted the Feature-8020 branch February 14, 2022 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants