This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler-website.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 0c8fafe Automated deployment: b6fde72af187257d52a74d1db79a6b190cdffe46
0c8fafe is described below
commit 0c8fafe7eb93d0c46bc5daead3f812725812b8f5
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Feb 14 01:52:48 2022 +0000
Automated deployment: b6fde72af187257d52a74d1db79a6b190cdffe46
---
en-us/docs/2.0.0/user_doc/guide/task/sql.html | 28 +++++++++++++---------
en-us/docs/2.0.0/user_doc/guide/task/sql.json | 2 +-
en-us/docs/2.0.1/user_doc/guide/task/sql.html | 28 +++++++++++++---------
en-us/docs/2.0.1/user_doc/guide/task/sql.json | 2 +-
en-us/docs/2.0.2/user_doc/guide/task/sql.html | 28 +++++++++++++---------
en-us/docs/2.0.2/user_doc/guide/task/sql.json | 2 +-
en-us/docs/2.0.3/user_doc/guide/task/sql.html | 28 +++++++++++++---------
en-us/docs/2.0.3/user_doc/guide/task/sql.json | 2 +-
en-us/docs/dev/user_doc/guide/task/sql.html | 28 +++++++++++++---------
en-us/docs/dev/user_doc/guide/task/sql.json | 2 +-
en-us/docs/latest/user_doc/guide/task/sql.html | 28 +++++++++++++---------
en-us/docs/latest/user_doc/guide/task/sql.json | 2 +-
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
zh-cn/docs/2.0.0/user_doc/guide/task/sql.html | 32 +++++++++++++++----------
zh-cn/docs/2.0.0/user_doc/guide/task/sql.json | 2 +-
zh-cn/docs/2.0.1/user_doc/guide/task/sql.html | 32 +++++++++++++++----------
zh-cn/docs/2.0.1/user_doc/guide/task/sql.json | 2 +-
zh-cn/docs/2.0.2/user_doc/guide/task/sql.html | 32 +++++++++++++++----------
zh-cn/docs/2.0.2/user_doc/guide/task/sql.json | 2 +-
zh-cn/docs/2.0.3/user_doc/guide/task/sql.html | 32 +++++++++++++++----------
zh-cn/docs/2.0.3/user_doc/guide/task/sql.json | 2 +-
zh-cn/docs/dev/user_doc/guide/task/sql.html | 32 +++++++++++++++----------
zh-cn/docs/dev/user_doc/guide/task/sql.json | 2 +-
zh-cn/docs/latest/user_doc/guide/task/sql.html | 32 +++++++++++++++----------
zh-cn/docs/latest/user_doc/guide/task/sql.json | 2 +-
27 files changed, 228 insertions(+), 156 deletions(-)
diff --git a/en-us/docs/2.0.0/user_doc/guide/task/sql.html
b/en-us/docs/2.0.0/user_doc/guide/task/sql.html
index 206bd23..a0f5ddf 100644
--- a/en-us/docs/2.0.0/user_doc/guide/task/sql.html
+++ b/en-us/docs/2.0.0/user_doc/guide/task/sql.html
@@ -11,19 +11,16 @@
</head>
<body>
<div id="root"><div class="md2html docs-page" data-reactroot=""><header
class="header-container header-container-dark"><div class="header-body"><span
class="mobile-menu-btn mobile-menu-btn-dark"></span><a
href="/en-us/index.html"><img class="logo" src="/img/hlogo_white.svg"/></a><div
class="search search-dark"><span class="icon-search"></span></div><span
class="language-switch language-switch-dark">中</span><div
class="header-menu"><div><ul class="ant-menu whiteClass ant-menu-light ant-
[...]
+<h2>Overview</h2>
+<p>SQL task, used to connect to database and execute SQL.</p>
+<h2>create data source</h2>
+<p>Refer to <a href="../datasource/introduction.md">Data Source</a></p>
+<h2>Create Task</h2>
<ul>
-<li>Drag in the toolbar<img
src="https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png"
alt="PNG">Task node into the drawing board</li>
-<li>Non-query SQL function: edit non-query SQL task information, select
non-query for sql type, as shown in the figure below:</li>
+<li>Click Project Management-Project Name-Workflow Definition, and click the
"Create Workflow" button to enter the DAG editing page.</li>
+<li>Drag <img src="/img/tasks/icons/sql.png" width="25"/> from the toolbar to
the drawing board.</li>
</ul>
- <p align="center">
- <img src="/img/sql-en.png" width="80%" />
-</p>
-<ul>
-<li>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.</li>
-</ul>
-<p align="center">
- <img src="/img/sql-node-en.png" width="80%" />
- </p>
+<h2>Task Parameter</h2>
<ul>
<li>Data source: select the corresponding data source</li>
<li>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.</li>
@@ -34,6 +31,15 @@
<li>Pre-sql: Pre-sql is executed before the sql statement.</li>
<li>Post-sql: Post-sql is executed after the sql statement.</li>
</ul>
+<h2>Task Example</h2>
+<h3>Create a temporary table in hive and write data</h3>
+<p>This example creates a temporary table <code>tmp_hello_world</code> 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:
<code>tmp_hello_world_{yyyyMMdd}</code>.</p>
+<p><img src="/img/tasks/demo/hive-sql.png" alt="hive-sql"></p>
+<h3>After running the task successfully, query the results in hive.</h3>
+<p>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 <code>select * from tmp_hello_world_{yyyyMMdd}</code>, please replace
'{yyyyMMdd}' with the date of the running day. The query screenshot is as
follows:</p>
+<p><img src="/img/tasks/demo/hive-result.png" alt="hive-sql"></p>
+<h2>Notice</h2>
+<p>Pay attention to the selection of SQL type. If it is an insert operation,
you need to select "Non Query" type.</p>
</div></section><footer class="footer-container"><div
class="footer-body"><div><h3>About us</h3><h4>Do you need feedback? Please
contact us through the following ways.</h4></div><div
class="contact-container"><ul><li><a
href="/en-us/community/development/subscribe.html"><img class="img-base"
src="/img/emailgray.png"/><img class="img-change"
src="/img/emailblue.png"/><p>Email List</p></a></li><li><a
href="https://twitter.com/dolphinschedule"><img class="img-base"
src="/img/twittergray.png [...]
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-with-addons.min.js"></script>
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-dom.min.js"></script>
diff --git a/en-us/docs/2.0.0/user_doc/guide/task/sql.json
b/en-us/docs/2.0.0/user_doc/guide/task/sql.json
index a9afbcf..1f7b18f 100644
--- a/en-us/docs/2.0.0/user_doc/guide/task/sql.json
+++ b/en-us/docs/2.0.0/user_doc/guide/task/sql.json
@@ -1,6 +1,6 @@
{
"filename": "sql.md",
- "__html": "<h1>SQL</h1>\n<ul>\n<li>Drag in the toolbar<img
src=\"https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png\"
alt=\"PNG\">Task node into the drawing board</li>\n<li>Non-query SQL function:
edit non-query SQL task information, select non-query for sql type, as shown in
the figure below:</li>\n</ul>\n <p align=\"center\">\n <img
src=\"/img/sql-en.png\" width=\"80%\" />\n</p>\n<ul>\n<li>Query SQL function:
Edit and query SQL task information, sql type selecti [...]
+ "__html": "<h1>SQL</h1>\n<h2>Overview</h2>\n<p>SQL task, used to connect to
database and execute SQL.</p>\n<h2>create data source</h2>\n<p>Refer to <a
href=\"../datasource/introduction.md\">Data Source</a></p>\n<h2>Create
Task</h2>\n<ul>\n<li>Click Project Management-Project Name-Workflow Definition,
and click the "Create Workflow" button to enter the DAG editing
page.</li>\n<li>Drag <img src=\"/img/tasks/icons/sql.png\" width=\"25\"/> from
the toolbar to the drawing board.</ [...]
"link": "/dist/en-us/docs/2.0.0/user_doc/guide/task/sql.html",
"meta": {}
}
\ No newline at end of file
diff --git a/en-us/docs/2.0.1/user_doc/guide/task/sql.html
b/en-us/docs/2.0.1/user_doc/guide/task/sql.html
index c0310df..4df33d3 100644
--- a/en-us/docs/2.0.1/user_doc/guide/task/sql.html
+++ b/en-us/docs/2.0.1/user_doc/guide/task/sql.html
@@ -11,19 +11,16 @@
</head>
<body>
<div id="root"><div class="md2html docs-page" data-reactroot=""><header
class="header-container header-container-dark"><div class="header-body"><span
class="mobile-menu-btn mobile-menu-btn-dark"></span><a
href="/en-us/index.html"><img class="logo" src="/img/hlogo_white.svg"/></a><div
class="search search-dark"><span class="icon-search"></span></div><span
class="language-switch language-switch-dark">中</span><div
class="header-menu"><div><ul class="ant-menu whiteClass ant-menu-light ant-
[...]
+<h2>Overview</h2>
+<p>SQL task, used to connect to database and execute SQL.</p>
+<h2>create data source</h2>
+<p>Refer to <a href="../datasource/introduction.md">Data Source</a></p>
+<h2>Create Task</h2>
<ul>
-<li>Drag in the toolbar<img
src="https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png"
alt="PNG">Task node into the drawing board</li>
-<li>Non-query SQL function: edit non-query SQL task information, select
non-query for sql type, as shown in the figure below:</li>
+<li>Click Project Management-Project Name-Workflow Definition, and click the
"Create Workflow" button to enter the DAG editing page.</li>
+<li>Drag <img src="/img/tasks/icons/sql.png" width="25"/> from the toolbar to
the drawing board.</li>
</ul>
- <p align="center">
- <img src="/img/sql-en.png" width="80%" />
-</p>
-<ul>
-<li>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.</li>
-</ul>
-<p align="center">
- <img src="/img/sql-node-en.png" width="80%" />
- </p>
+<h2>Task Parameter</h2>
<ul>
<li>Data source: select the corresponding data source</li>
<li>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.</li>
@@ -34,6 +31,15 @@
<li>Pre-sql: Pre-sql is executed before the sql statement.</li>
<li>Post-sql: Post-sql is executed after the sql statement.</li>
</ul>
+<h2>Task Example</h2>
+<h3>Create a temporary table in hive and write data</h3>
+<p>This example creates a temporary table <code>tmp_hello_world</code> 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:
<code>tmp_hello_world_{yyyyMMdd}</code>.</p>
+<p><img src="/img/tasks/demo/hive-sql.png" alt="hive-sql"></p>
+<h3>After running the task successfully, query the results in hive.</h3>
+<p>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 <code>select * from tmp_hello_world_{yyyyMMdd}</code>, please replace
'{yyyyMMdd}' with the date of the running day. The query screenshot is as
follows:</p>
+<p><img src="/img/tasks/demo/hive-result.png" alt="hive-sql"></p>
+<h2>Notice</h2>
+<p>Pay attention to the selection of SQL type. If it is an insert operation,
you need to select "Non Query" type.</p>
</div></section><footer class="footer-container"><div
class="footer-body"><div><h3>About us</h3><h4>Do you need feedback? Please
contact us through the following ways.</h4></div><div
class="contact-container"><ul><li><a
href="/en-us/community/development/subscribe.html"><img class="img-base"
src="/img/emailgray.png"/><img class="img-change"
src="/img/emailblue.png"/><p>Email List</p></a></li><li><a
href="https://twitter.com/dolphinschedule"><img class="img-base"
src="/img/twittergray.png [...]
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-with-addons.min.js"></script>
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-dom.min.js"></script>
diff --git a/en-us/docs/2.0.1/user_doc/guide/task/sql.json
b/en-us/docs/2.0.1/user_doc/guide/task/sql.json
index ed4894e..0437a33 100644
--- a/en-us/docs/2.0.1/user_doc/guide/task/sql.json
+++ b/en-us/docs/2.0.1/user_doc/guide/task/sql.json
@@ -1,6 +1,6 @@
{
"filename": "sql.md",
- "__html": "<h1>SQL</h1>\n<ul>\n<li>Drag in the toolbar<img
src=\"https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png\"
alt=\"PNG\">Task node into the drawing board</li>\n<li>Non-query SQL function:
edit non-query SQL task information, select non-query for sql type, as shown in
the figure below:</li>\n</ul>\n <p align=\"center\">\n <img
src=\"/img/sql-en.png\" width=\"80%\" />\n</p>\n<ul>\n<li>Query SQL function:
Edit and query SQL task information, sql type selecti [...]
+ "__html": "<h1>SQL</h1>\n<h2>Overview</h2>\n<p>SQL task, used to connect to
database and execute SQL.</p>\n<h2>create data source</h2>\n<p>Refer to <a
href=\"../datasource/introduction.md\">Data Source</a></p>\n<h2>Create
Task</h2>\n<ul>\n<li>Click Project Management-Project Name-Workflow Definition,
and click the "Create Workflow" button to enter the DAG editing
page.</li>\n<li>Drag <img src=\"/img/tasks/icons/sql.png\" width=\"25\"/> from
the toolbar to the drawing board.</ [...]
"link": "/dist/en-us/docs/2.0.1/user_doc/guide/task/sql.html",
"meta": {}
}
\ No newline at end of file
diff --git a/en-us/docs/2.0.2/user_doc/guide/task/sql.html
b/en-us/docs/2.0.2/user_doc/guide/task/sql.html
index 6ad0e62..62381f2 100644
--- a/en-us/docs/2.0.2/user_doc/guide/task/sql.html
+++ b/en-us/docs/2.0.2/user_doc/guide/task/sql.html
@@ -11,19 +11,16 @@
</head>
<body>
<div id="root"><div class="md2html docs-page" data-reactroot=""><header
class="header-container header-container-dark"><div class="header-body"><span
class="mobile-menu-btn mobile-menu-btn-dark"></span><a
href="/en-us/index.html"><img class="logo" src="/img/hlogo_white.svg"/></a><div
class="search search-dark"><span class="icon-search"></span></div><span
class="language-switch language-switch-dark">中</span><div
class="header-menu"><div><ul class="ant-menu whiteClass ant-menu-light ant-
[...]
+<h2>Overview</h2>
+<p>SQL task, used to connect to database and execute SQL.</p>
+<h2>create data source</h2>
+<p>Refer to <a href="../datasource/introduction.md">Data Source</a></p>
+<h2>Create Task</h2>
<ul>
-<li>Drag in the toolbar<img
src="https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png"
alt="PNG">Task node into the drawing board</li>
-<li>Non-query SQL function: edit non-query SQL task information, select
non-query for sql type, as shown in the figure below:</li>
+<li>Click Project Management-Project Name-Workflow Definition, and click the
"Create Workflow" button to enter the DAG editing page.</li>
+<li>Drag <img src="/img/tasks/icons/sql.png" width="25"/> from the toolbar to
the drawing board.</li>
</ul>
- <p align="center">
- <img src="/img/sql-en.png" width="80%" />
-</p>
-<ul>
-<li>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.</li>
-</ul>
-<p align="center">
- <img src="/img/sql-node-en.png" width="80%" />
- </p>
+<h2>Task Parameter</h2>
<ul>
<li>Data source: select the corresponding data source</li>
<li>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.</li>
@@ -34,6 +31,15 @@
<li>Pre-sql: Pre-sql is executed before the sql statement.</li>
<li>Post-sql: Post-sql is executed after the sql statement.</li>
</ul>
+<h2>Task Example</h2>
+<h3>Create a temporary table in hive and write data</h3>
+<p>This example creates a temporary table <code>tmp_hello_world</code> 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:
<code>tmp_hello_world_{yyyyMMdd}</code>.</p>
+<p><img src="/img/tasks/demo/hive-sql.png" alt="hive-sql"></p>
+<h3>After running the task successfully, query the results in hive.</h3>
+<p>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 <code>select * from tmp_hello_world_{yyyyMMdd}</code>, please replace
'{yyyyMMdd}' with the date of the running day. The query screenshot is as
follows:</p>
+<p><img src="/img/tasks/demo/hive-result.png" alt="hive-sql"></p>
+<h2>Notice</h2>
+<p>Pay attention to the selection of SQL type. If it is an insert operation,
you need to select "Non Query" type.</p>
</div></section><footer class="footer-container"><div
class="footer-body"><div><h3>About us</h3><h4>Do you need feedback? Please
contact us through the following ways.</h4></div><div
class="contact-container"><ul><li><a
href="/en-us/community/development/subscribe.html"><img class="img-base"
src="/img/emailgray.png"/><img class="img-change"
src="/img/emailblue.png"/><p>Email List</p></a></li><li><a
href="https://twitter.com/dolphinschedule"><img class="img-base"
src="/img/twittergray.png [...]
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-with-addons.min.js"></script>
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-dom.min.js"></script>
diff --git a/en-us/docs/2.0.2/user_doc/guide/task/sql.json
b/en-us/docs/2.0.2/user_doc/guide/task/sql.json
index 86cde54..de720a6 100644
--- a/en-us/docs/2.0.2/user_doc/guide/task/sql.json
+++ b/en-us/docs/2.0.2/user_doc/guide/task/sql.json
@@ -1,6 +1,6 @@
{
"filename": "sql.md",
- "__html": "<h1>SQL</h1>\n<ul>\n<li>Drag in the toolbar<img
src=\"https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png\"
alt=\"PNG\">Task node into the drawing board</li>\n<li>Non-query SQL function:
edit non-query SQL task information, select non-query for sql type, as shown in
the figure below:</li>\n</ul>\n <p align=\"center\">\n <img
src=\"/img/sql-en.png\" width=\"80%\" />\n</p>\n<ul>\n<li>Query SQL function:
Edit and query SQL task information, sql type selecti [...]
+ "__html": "<h1>SQL</h1>\n<h2>Overview</h2>\n<p>SQL task, used to connect to
database and execute SQL.</p>\n<h2>create data source</h2>\n<p>Refer to <a
href=\"../datasource/introduction.md\">Data Source</a></p>\n<h2>Create
Task</h2>\n<ul>\n<li>Click Project Management-Project Name-Workflow Definition,
and click the "Create Workflow" button to enter the DAG editing
page.</li>\n<li>Drag <img src=\"/img/tasks/icons/sql.png\" width=\"25\"/> from
the toolbar to the drawing board.</ [...]
"link": "/dist/en-us/docs/2.0.2/user_doc/guide/task/sql.html",
"meta": {}
}
\ No newline at end of file
diff --git a/en-us/docs/2.0.3/user_doc/guide/task/sql.html
b/en-us/docs/2.0.3/user_doc/guide/task/sql.html
index 354eed5..bcbf0d8 100644
--- a/en-us/docs/2.0.3/user_doc/guide/task/sql.html
+++ b/en-us/docs/2.0.3/user_doc/guide/task/sql.html
@@ -11,19 +11,16 @@
</head>
<body>
<div id="root"><div class="md2html docs-page" data-reactroot=""><header
class="header-container header-container-dark"><div class="header-body"><span
class="mobile-menu-btn mobile-menu-btn-dark"></span><a
href="/en-us/index.html"><img class="logo" src="/img/hlogo_white.svg"/></a><div
class="search search-dark"><span class="icon-search"></span></div><span
class="language-switch language-switch-dark">中</span><div
class="header-menu"><div><ul class="ant-menu whiteClass ant-menu-light ant-
[...]
+<h2>Overview</h2>
+<p>SQL task, used to connect to database and execute SQL.</p>
+<h2>create data source</h2>
+<p>Refer to <a href="../datasource/introduction.md">Data Source</a></p>
+<h2>Create Task</h2>
<ul>
-<li>Drag in the toolbar<img
src="https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png"
alt="PNG">Task node into the drawing board</li>
-<li>Non-query SQL function: edit non-query SQL task information, select
non-query for sql type, as shown in the figure below:</li>
+<li>Click Project Management-Project Name-Workflow Definition, and click the
"Create Workflow" button to enter the DAG editing page.</li>
+<li>Drag <img src="/img/tasks/icons/sql.png" width="25"/> from the toolbar to
the drawing board.</li>
</ul>
- <p align="center">
- <img src="/img/sql-en.png" width="80%" />
-</p>
-<ul>
-<li>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.</li>
-</ul>
-<p align="center">
- <img src="/img/sql-node-en.png" width="80%" />
- </p>
+<h2>Task Parameter</h2>
<ul>
<li>Data source: select the corresponding data source</li>
<li>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.</li>
@@ -34,6 +31,15 @@
<li>Pre-sql: Pre-sql is executed before the sql statement.</li>
<li>Post-sql: Post-sql is executed after the sql statement.</li>
</ul>
+<h2>Task Example</h2>
+<h3>Create a temporary table in hive and write data</h3>
+<p>This example creates a temporary table <code>tmp_hello_world</code> 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:
<code>tmp_hello_world_{yyyyMMdd}</code>.</p>
+<p><img src="/img/tasks/demo/hive-sql.png" alt="hive-sql"></p>
+<h3>After running the task successfully, query the results in hive.</h3>
+<p>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 <code>select * from tmp_hello_world_{yyyyMMdd}</code>, please replace
'{yyyyMMdd}' with the date of the running day. The query screenshot is as
follows:</p>
+<p><img src="/img/tasks/demo/hive-result.png" alt="hive-sql"></p>
+<h2>Notice</h2>
+<p>Pay attention to the selection of SQL type. If it is an insert operation,
you need to select "Non Query" type.</p>
</div></section><footer class="footer-container"><div
class="footer-body"><div><h3>About us</h3><h4>Do you need feedback? Please
contact us through the following ways.</h4></div><div
class="contact-container"><ul><li><a
href="/en-us/community/development/subscribe.html"><img class="img-base"
src="/img/emailgray.png"/><img class="img-change"
src="/img/emailblue.png"/><p>Email List</p></a></li><li><a
href="https://twitter.com/dolphinschedule"><img class="img-base"
src="/img/twittergray.png [...]
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-with-addons.min.js"></script>
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-dom.min.js"></script>
diff --git a/en-us/docs/2.0.3/user_doc/guide/task/sql.json
b/en-us/docs/2.0.3/user_doc/guide/task/sql.json
index de25a12..927740b 100644
--- a/en-us/docs/2.0.3/user_doc/guide/task/sql.json
+++ b/en-us/docs/2.0.3/user_doc/guide/task/sql.json
@@ -1,6 +1,6 @@
{
"filename": "sql.md",
- "__html": "<h1>SQL</h1>\n<ul>\n<li>Drag in the toolbar<img
src=\"https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png\"
alt=\"PNG\">Task node into the drawing board</li>\n<li>Non-query SQL function:
edit non-query SQL task information, select non-query for sql type, as shown in
the figure below:</li>\n</ul>\n <p align=\"center\">\n <img
src=\"/img/sql-en.png\" width=\"80%\" />\n</p>\n<ul>\n<li>Query SQL function:
Edit and query SQL task information, sql type selecti [...]
+ "__html": "<h1>SQL</h1>\n<h2>Overview</h2>\n<p>SQL task, used to connect to
database and execute SQL.</p>\n<h2>create data source</h2>\n<p>Refer to <a
href=\"../datasource/introduction.md\">Data Source</a></p>\n<h2>Create
Task</h2>\n<ul>\n<li>Click Project Management-Project Name-Workflow Definition,
and click the "Create Workflow" button to enter the DAG editing
page.</li>\n<li>Drag <img src=\"/img/tasks/icons/sql.png\" width=\"25\"/> from
the toolbar to the drawing board.</ [...]
"link": "/dist/en-us/docs/2.0.3/user_doc/guide/task/sql.html",
"meta": {}
}
\ No newline at end of file
diff --git a/en-us/docs/dev/user_doc/guide/task/sql.html
b/en-us/docs/dev/user_doc/guide/task/sql.html
index 04d6d86..a6cb4f5 100644
--- a/en-us/docs/dev/user_doc/guide/task/sql.html
+++ b/en-us/docs/dev/user_doc/guide/task/sql.html
@@ -11,19 +11,16 @@
</head>
<body>
<div id="root"><div class="md2html docs-page" data-reactroot=""><header
class="header-container header-container-dark"><div class="header-body"><span
class="mobile-menu-btn mobile-menu-btn-dark"></span><a
href="/en-us/index.html"><img class="logo" src="/img/hlogo_white.svg"/></a><div
class="search search-dark"><span class="icon-search"></span></div><span
class="language-switch language-switch-dark">中</span><div
class="header-menu"><div><ul class="ant-menu whiteClass ant-menu-light ant-
[...]
+<h2>Overview</h2>
+<p>SQL task, used to connect to database and execute SQL.</p>
+<h2>create data source</h2>
+<p>Refer to <a href="../datasource/introduction.md">Data Source</a></p>
+<h2>Create Task</h2>
<ul>
-<li>Drag in the toolbar<img
src="https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png"
alt="PNG">Task node into the drawing board</li>
-<li>Non-query SQL function: edit non-query SQL task information, select
non-query for sql type, as shown in the figure below:</li>
+<li>Click Project Management-Project Name-Workflow Definition, and click the
"Create Workflow" button to enter the DAG editing page.</li>
+<li>Drag <img src="/img/tasks/icons/sql.png" width="25"/> from the toolbar to
the drawing board.</li>
</ul>
- <p align="center">
- <img src="/img/sql-en.png" width="80%" />
-</p>
-<ul>
-<li>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.</li>
-</ul>
-<p align="center">
- <img src="/img/sql-node-en.png" width="80%" />
- </p>
+<h2>Task Parameter</h2>
<ul>
<li>Data source: select the corresponding data source</li>
<li>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.</li>
@@ -34,6 +31,15 @@
<li>Pre-sql: Pre-sql is executed before the sql statement.</li>
<li>Post-sql: Post-sql is executed after the sql statement.</li>
</ul>
+<h2>Task Example</h2>
+<h3>Create a temporary table in hive and write data</h3>
+<p>This example creates a temporary table <code>tmp_hello_world</code> 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:
<code>tmp_hello_world_{yyyyMMdd}</code>.</p>
+<p><img src="/img/tasks/demo/hive-sql.png" alt="hive-sql"></p>
+<h3>After running the task successfully, query the results in hive.</h3>
+<p>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 <code>select * from tmp_hello_world_{yyyyMMdd}</code>, please replace
'{yyyyMMdd}' with the date of the running day. The query screenshot is as
follows:</p>
+<p><img src="/img/tasks/demo/hive-result.png" alt="hive-sql"></p>
+<h2>Notice</h2>
+<p>Pay attention to the selection of SQL type. If it is an insert operation,
you need to select "Non Query" type.</p>
</div></section><footer class="footer-container"><div
class="footer-body"><div><h3>About us</h3><h4>Do you need feedback? Please
contact us through the following ways.</h4></div><div
class="contact-container"><ul><li><a
href="/en-us/community/development/subscribe.html"><img class="img-base"
src="/img/emailgray.png"/><img class="img-change"
src="/img/emailblue.png"/><p>Email List</p></a></li><li><a
href="https://twitter.com/dolphinschedule"><img class="img-base"
src="/img/twittergray.png [...]
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-with-addons.min.js"></script>
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-dom.min.js"></script>
diff --git a/en-us/docs/dev/user_doc/guide/task/sql.json
b/en-us/docs/dev/user_doc/guide/task/sql.json
index 3c71ffc..cf0c7b0 100644
--- a/en-us/docs/dev/user_doc/guide/task/sql.json
+++ b/en-us/docs/dev/user_doc/guide/task/sql.json
@@ -1,6 +1,6 @@
{
"filename": "sql.md",
- "__html": "<h1>SQL</h1>\n<ul>\n<li>Drag in the toolbar<img
src=\"https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png\"
alt=\"PNG\">Task node into the drawing board</li>\n<li>Non-query SQL function:
edit non-query SQL task information, select non-query for sql type, as shown in
the figure below:</li>\n</ul>\n <p align=\"center\">\n <img
src=\"/img/sql-en.png\" width=\"80%\" />\n</p>\n<ul>\n<li>Query SQL function:
Edit and query SQL task information, sql type selecti [...]
+ "__html": "<h1>SQL</h1>\n<h2>Overview</h2>\n<p>SQL task, used to connect to
database and execute SQL.</p>\n<h2>create data source</h2>\n<p>Refer to <a
href=\"../datasource/introduction.md\">Data Source</a></p>\n<h2>Create
Task</h2>\n<ul>\n<li>Click Project Management-Project Name-Workflow Definition,
and click the "Create Workflow" button to enter the DAG editing
page.</li>\n<li>Drag <img src=\"/img/tasks/icons/sql.png\" width=\"25\"/> from
the toolbar to the drawing board.</ [...]
"link": "/dist/en-us/docs/dev/user_doc/guide/task/sql.html",
"meta": {}
}
\ No newline at end of file
diff --git a/en-us/docs/latest/user_doc/guide/task/sql.html
b/en-us/docs/latest/user_doc/guide/task/sql.html
index 354eed5..bcbf0d8 100644
--- a/en-us/docs/latest/user_doc/guide/task/sql.html
+++ b/en-us/docs/latest/user_doc/guide/task/sql.html
@@ -11,19 +11,16 @@
</head>
<body>
<div id="root"><div class="md2html docs-page" data-reactroot=""><header
class="header-container header-container-dark"><div class="header-body"><span
class="mobile-menu-btn mobile-menu-btn-dark"></span><a
href="/en-us/index.html"><img class="logo" src="/img/hlogo_white.svg"/></a><div
class="search search-dark"><span class="icon-search"></span></div><span
class="language-switch language-switch-dark">中</span><div
class="header-menu"><div><ul class="ant-menu whiteClass ant-menu-light ant-
[...]
+<h2>Overview</h2>
+<p>SQL task, used to connect to database and execute SQL.</p>
+<h2>create data source</h2>
+<p>Refer to <a href="../datasource/introduction.md">Data Source</a></p>
+<h2>Create Task</h2>
<ul>
-<li>Drag in the toolbar<img
src="https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png"
alt="PNG">Task node into the drawing board</li>
-<li>Non-query SQL function: edit non-query SQL task information, select
non-query for sql type, as shown in the figure below:</li>
+<li>Click Project Management-Project Name-Workflow Definition, and click the
"Create Workflow" button to enter the DAG editing page.</li>
+<li>Drag <img src="/img/tasks/icons/sql.png" width="25"/> from the toolbar to
the drawing board.</li>
</ul>
- <p align="center">
- <img src="/img/sql-en.png" width="80%" />
-</p>
-<ul>
-<li>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.</li>
-</ul>
-<p align="center">
- <img src="/img/sql-node-en.png" width="80%" />
- </p>
+<h2>Task Parameter</h2>
<ul>
<li>Data source: select the corresponding data source</li>
<li>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.</li>
@@ -34,6 +31,15 @@
<li>Pre-sql: Pre-sql is executed before the sql statement.</li>
<li>Post-sql: Post-sql is executed after the sql statement.</li>
</ul>
+<h2>Task Example</h2>
+<h3>Create a temporary table in hive and write data</h3>
+<p>This example creates a temporary table <code>tmp_hello_world</code> 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:
<code>tmp_hello_world_{yyyyMMdd}</code>.</p>
+<p><img src="/img/tasks/demo/hive-sql.png" alt="hive-sql"></p>
+<h3>After running the task successfully, query the results in hive.</h3>
+<p>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 <code>select * from tmp_hello_world_{yyyyMMdd}</code>, please replace
'{yyyyMMdd}' with the date of the running day. The query screenshot is as
follows:</p>
+<p><img src="/img/tasks/demo/hive-result.png" alt="hive-sql"></p>
+<h2>Notice</h2>
+<p>Pay attention to the selection of SQL type. If it is an insert operation,
you need to select "Non Query" type.</p>
</div></section><footer class="footer-container"><div
class="footer-body"><div><h3>About us</h3><h4>Do you need feedback? Please
contact us through the following ways.</h4></div><div
class="contact-container"><ul><li><a
href="/en-us/community/development/subscribe.html"><img class="img-base"
src="/img/emailgray.png"/><img class="img-change"
src="/img/emailblue.png"/><p>Email List</p></a></li><li><a
href="https://twitter.com/dolphinschedule"><img class="img-base"
src="/img/twittergray.png [...]
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-with-addons.min.js"></script>
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-dom.min.js"></script>
diff --git a/en-us/docs/latest/user_doc/guide/task/sql.json
b/en-us/docs/latest/user_doc/guide/task/sql.json
index de25a12..927740b 100644
--- a/en-us/docs/latest/user_doc/guide/task/sql.json
+++ b/en-us/docs/latest/user_doc/guide/task/sql.json
@@ -1,6 +1,6 @@
{
"filename": "sql.md",
- "__html": "<h1>SQL</h1>\n<ul>\n<li>Drag in the toolbar<img
src=\"https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png\"
alt=\"PNG\">Task node into the drawing board</li>\n<li>Non-query SQL function:
edit non-query SQL task information, select non-query for sql type, as shown in
the figure below:</li>\n</ul>\n <p align=\"center\">\n <img
src=\"/img/sql-en.png\" width=\"80%\" />\n</p>\n<ul>\n<li>Query SQL function:
Edit and query SQL task information, sql type selecti [...]
+ "__html": "<h1>SQL</h1>\n<h2>Overview</h2>\n<p>SQL task, used to connect to
database and execute SQL.</p>\n<h2>create data source</h2>\n<p>Refer to <a
href=\"../datasource/introduction.md\">Data Source</a></p>\n<h2>Create
Task</h2>\n<ul>\n<li>Click Project Management-Project Name-Workflow Definition,
and click the "Create Workflow" button to enter the DAG editing
page.</li>\n<li>Drag <img src=\"/img/tasks/icons/sql.png\" width=\"25\"/> from
the toolbar to the drawing board.</ [...]
"link": "/dist/en-us/docs/2.0.3/user_doc/guide/task/sql.html",
"meta": {}
}
\ 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
diff --git a/zh-cn/docs/2.0.0/user_doc/guide/task/sql.html
b/zh-cn/docs/2.0.0/user_doc/guide/task/sql.html
index 3119654..c02a169 100644
--- a/zh-cn/docs/2.0.0/user_doc/guide/task/sql.html
+++ b/zh-cn/docs/2.0.0/user_doc/guide/task/sql.html
@@ -10,30 +10,36 @@
<link rel="stylesheet" href="/build/vendor.23870e5.css">
</head>
<body>
- <div id="root"><div class="md2html docs-page" data-reactroot=""><header
class="header-container header-container-dark"><div class="header-body"><span
class="mobile-menu-btn mobile-menu-btn-dark"></span><a
href="/zh-cn/index.html"><img class="logo" src="/img/hlogo_white.svg"/></a><div
class="search search-dark"><span class="icon-search"></span></div><span
class="language-switch language-switch-dark">En</span><div
class="header-menu"><div><ul class="ant-menu whiteClass ant-menu-light ant [...]
+ <div id="root"><div class="md2html docs-page" data-reactroot=""><header
class="header-container header-container-dark"><div class="header-body"><span
class="mobile-menu-btn mobile-menu-btn-dark"></span><a
href="/zh-cn/index.html"><img class="logo" src="/img/hlogo_white.svg"/></a><div
class="search search-dark"><span class="icon-search"></span></div><span
class="language-switch language-switch-dark">En</span><div
class="header-menu"><div><ul class="ant-menu whiteClass ant-menu-light ant [...]
+<h2>综述</h2>
+<p>SQL任务类型,用于连接数据库并执行相应SQL。</p>
+<h2>创建数据源</h2>
+<p>可参考<a href="../datasource/introduction.md">数据源中心介绍</a>。</p>
+<h2>创建任务</h2>
<ul>
-<li>拖动工具栏中的<img
src="https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png"
alt="PNG">任务节点到画板中</li>
-<li>非查询SQL功能:编辑非查询SQL任务信息,sql类型选择非查询,如下图所示:<p align="center">
- <img src="/img/sql-node.png" width="80%" />
-</li>
+<li>点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。</li>
+<li>工具栏中拖动 <img src="/img/tasks/icons/sql.png" width="25"/>
到画板中,选择需要连接的数据源,即可完成创建。</li>
</ul>
- </p>
-<ul>
-<li>查询SQL功能:编辑查询SQL任务信息,sql类型选择查询,选择表格或附件形式发送邮件到指定的收件人,如下图所示。</li>
-</ul>
-<p align="center">
- <img src="/img/sql-node2.png" width="80%" />
- </p>
+<h2>任务参数</h2>
<ul>
<li>数据源:选择对应的数据源</li>
<li>sql类型:支持查询和非查询两种,查询是select类型的查询,是有结果集返回的,可以指定邮件通知为表格、附件或表格附件三种模板。非查询是没有结果集返回的,是针对update、delete、insert三种类型的操作。</li>
<li>sql参数:输入参数格式为key1=value1;key2=value2…</li>
<li>sql语句:SQL语句</li>
-<li>UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。</li>
+<li>UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。</li>
<li>自定义参数:SQL任务类型,而存储过程是自定义参数顺序的给方法设置值自定义参数类型和数据类型同存储过程任务类型一样。区别在于SQL任务类型自定义参数会替换sql语句中${变量}。</li>
<li>前置sql:前置sql在sql语句之前执行。</li>
<li>后置sql:后置sql在sql语句之后执行。</li>
</ul>
+<h2>任务样例</h2>
+<h3>在hive中创建临时表并写入数据</h3>
+<p>该样例向hive中创建临时表<code>tmp_hello_world</code>并写入一行数据。选择SQL类型为非查询,在创建临时表之前需要确保该表不存在,所以我们使用自定义参数,在每次运行时获取当天时间作为表名后缀,这样这个任务就可以每天运行。创建的表名格式为:<code>tmp_hello_world_{yyyyMMdd}</code>。</p>
+<p><img src="/img/tasks/demo/hive-sql.png" alt="hive-sql"></p>
+<h3>运行该任务成功之后在hive中查询结果</h3>
+<p>登录集群使用<code>hive</code>命令或使用<code>beeline</code>、<code>JDBC</code>等方式连接<code>apache
hive</code>进行查询,查询SQL为<code>select * from
tmp_hello_world_{yyyyMMdd}</code>,请将<code>{yyyyMMdd}</code>替换为运行当天的日期,查询截图如下:</p>
+<p><img src="/img/tasks/demo/hive-result.png" alt="hive-sql"></p>
+<h2>注意事项</h2>
+<p>注意SQL类型的选择,如果是INSERT等操作需要选择非查询类型。</p>
</div></section><footer class="footer-container"><div
class="footer-body"><div><h3>联系我们</h3><h4>有问题需要反馈?请通过以下方式联系我们。</h4></div><div
class="contact-container"><ul><li><a
href="/zh-cn/community/development/subscribe.html"><img class="img-base"
src="/img/emailgray.png"/><img class="img-change"
src="/img/emailblue.png"/><p>邮件列表</p></a></li><li><a
href="https://twitter.com/dolphinschedule"><img class="img-base"
src="/img/twittergray.png"/><img class="img-change"
src="/img/twitterblue.png"/><p [...]
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-with-addons.min.js"></script>
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-dom.min.js"></script>
diff --git a/zh-cn/docs/2.0.0/user_doc/guide/task/sql.json
b/zh-cn/docs/2.0.0/user_doc/guide/task/sql.json
index 38b80c6..2cd6600 100644
--- a/zh-cn/docs/2.0.0/user_doc/guide/task/sql.json
+++ b/zh-cn/docs/2.0.0/user_doc/guide/task/sql.json
@@ -1,6 +1,6 @@
{
"filename": "sql.md",
- "__html": "<h1>SQL节点</h1>\n<ul>\n<li>拖动工具栏中的<img
src=\"https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png\"
alt=\"PNG\">任务节点到画板中</li>\n<li>非查询SQL功能:编辑非查询SQL任务信息,sql类型选择非查询,如下图所示:<p
align=\"center\">\n <img src=\"/img/sql-node.png\" width=\"80%\"
/>\n</li>\n</ul>\n
</p>\n<ul>\n<li>查询SQL功能:编辑查询SQL任务信息,sql类型选择查询,选择表格或附件形式发送邮件到指定的收件人,如下图所示。</li>\n</ul>\n<p
align=\"center\">\n <img src=\"/img/sql-node2.png\" width=\"80%\" />\n
</p>\n<ul>\n<li>数据源:选择对应的数据源</li>\n<li>sq [...]
+ "__html":
"<h1>SQL</h1>\n<h2>综述</h2>\n<p>SQL任务类型,用于连接数据库并执行相应SQL。</p>\n<h2>创建数据源</h2>\n<p>可参考<a
href=\"../datasource/introduction.md\">数据源中心介绍</a>。</p>\n<h2>创建任务</h2>\n<ul>\n<li>点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。</li>\n<li>工具栏中拖动
<img src=\"/img/tasks/icons/sql.png\" width=\"25\"/>
到画板中,选择需要连接的数据源,即可完成创建。</li>\n</ul>\n<h2>任务参数</h2>\n<ul>\n<li>数据源:选择对应的数据源</li>\n<li>sql类型:支持查询和非查询两种,查询是select类型的查询,是有结果集返回的,可以指定邮件通知为表格、附件或表格附件三种模板。非查询是没有结果集返回的,是针对update、delete、insert三种类型的
[...]
"link": "/dist/zh-cn/docs/2.0.0/user_doc/guide/task/sql.html",
"meta": {}
}
\ No newline at end of file
diff --git a/zh-cn/docs/2.0.1/user_doc/guide/task/sql.html
b/zh-cn/docs/2.0.1/user_doc/guide/task/sql.html
index b1f50af..f063a8c 100644
--- a/zh-cn/docs/2.0.1/user_doc/guide/task/sql.html
+++ b/zh-cn/docs/2.0.1/user_doc/guide/task/sql.html
@@ -10,30 +10,36 @@
<link rel="stylesheet" href="/build/vendor.23870e5.css">
</head>
<body>
- <div id="root"><div class="md2html docs-page" data-reactroot=""><header
class="header-container header-container-dark"><div class="header-body"><span
class="mobile-menu-btn mobile-menu-btn-dark"></span><a
href="/zh-cn/index.html"><img class="logo" src="/img/hlogo_white.svg"/></a><div
class="search search-dark"><span class="icon-search"></span></div><span
class="language-switch language-switch-dark">En</span><div
class="header-menu"><div><ul class="ant-menu whiteClass ant-menu-light ant [...]
+ <div id="root"><div class="md2html docs-page" data-reactroot=""><header
class="header-container header-container-dark"><div class="header-body"><span
class="mobile-menu-btn mobile-menu-btn-dark"></span><a
href="/zh-cn/index.html"><img class="logo" src="/img/hlogo_white.svg"/></a><div
class="search search-dark"><span class="icon-search"></span></div><span
class="language-switch language-switch-dark">En</span><div
class="header-menu"><div><ul class="ant-menu whiteClass ant-menu-light ant [...]
+<h2>综述</h2>
+<p>SQL任务类型,用于连接数据库并执行相应SQL。</p>
+<h2>创建数据源</h2>
+<p>可参考<a href="../datasource/introduction.md">数据源中心介绍</a>。</p>
+<h2>创建任务</h2>
<ul>
-<li>拖动工具栏中的<img
src="https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png"
alt="PNG">任务节点到画板中</li>
-<li>非查询SQL功能:编辑非查询SQL任务信息,sql类型选择非查询,如下图所示:<p align="center">
- <img src="/img/sql-node.png" width="80%" />
-</li>
+<li>点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。</li>
+<li>工具栏中拖动 <img src="/img/tasks/icons/sql.png" width="25"/>
到画板中,选择需要连接的数据源,即可完成创建。</li>
</ul>
- </p>
-<ul>
-<li>查询SQL功能:编辑查询SQL任务信息,sql类型选择查询,选择表格或附件形式发送邮件到指定的收件人,如下图所示。</li>
-</ul>
-<p align="center">
- <img src="/img/sql-node2.png" width="80%" />
- </p>
+<h2>任务参数</h2>
<ul>
<li>数据源:选择对应的数据源</li>
<li>sql类型:支持查询和非查询两种,查询是select类型的查询,是有结果集返回的,可以指定邮件通知为表格、附件或表格附件三种模板。非查询是没有结果集返回的,是针对update、delete、insert三种类型的操作。</li>
<li>sql参数:输入参数格式为key1=value1;key2=value2…</li>
<li>sql语句:SQL语句</li>
-<li>UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。</li>
+<li>UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。</li>
<li>自定义参数:SQL任务类型,而存储过程是自定义参数顺序的给方法设置值自定义参数类型和数据类型同存储过程任务类型一样。区别在于SQL任务类型自定义参数会替换sql语句中${变量}。</li>
<li>前置sql:前置sql在sql语句之前执行。</li>
<li>后置sql:后置sql在sql语句之后执行。</li>
</ul>
+<h2>任务样例</h2>
+<h3>在hive中创建临时表并写入数据</h3>
+<p>该样例向hive中创建临时表<code>tmp_hello_world</code>并写入一行数据。选择SQL类型为非查询,在创建临时表之前需要确保该表不存在,所以我们使用自定义参数,在每次运行时获取当天时间作为表名后缀,这样这个任务就可以每天运行。创建的表名格式为:<code>tmp_hello_world_{yyyyMMdd}</code>。</p>
+<p><img src="/img/tasks/demo/hive-sql.png" alt="hive-sql"></p>
+<h3>运行该任务成功之后在hive中查询结果</h3>
+<p>登录集群使用<code>hive</code>命令或使用<code>beeline</code>、<code>JDBC</code>等方式连接<code>apache
hive</code>进行查询,查询SQL为<code>select * from
tmp_hello_world_{yyyyMMdd}</code>,请将<code>{yyyyMMdd}</code>替换为运行当天的日期,查询截图如下:</p>
+<p><img src="/img/tasks/demo/hive-result.png" alt="hive-sql"></p>
+<h2>注意事项</h2>
+<p>注意SQL类型的选择,如果是INSERT等操作需要选择非查询类型。</p>
</div></section><footer class="footer-container"><div
class="footer-body"><div><h3>联系我们</h3><h4>有问题需要反馈?请通过以下方式联系我们。</h4></div><div
class="contact-container"><ul><li><a
href="/zh-cn/community/development/subscribe.html"><img class="img-base"
src="/img/emailgray.png"/><img class="img-change"
src="/img/emailblue.png"/><p>邮件列表</p></a></li><li><a
href="https://twitter.com/dolphinschedule"><img class="img-base"
src="/img/twittergray.png"/><img class="img-change"
src="/img/twitterblue.png"/><p [...]
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-with-addons.min.js"></script>
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-dom.min.js"></script>
diff --git a/zh-cn/docs/2.0.1/user_doc/guide/task/sql.json
b/zh-cn/docs/2.0.1/user_doc/guide/task/sql.json
index 48bce37..2533799 100644
--- a/zh-cn/docs/2.0.1/user_doc/guide/task/sql.json
+++ b/zh-cn/docs/2.0.1/user_doc/guide/task/sql.json
@@ -1,6 +1,6 @@
{
"filename": "sql.md",
- "__html": "<h1>SQL节点</h1>\n<ul>\n<li>拖动工具栏中的<img
src=\"https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png\"
alt=\"PNG\">任务节点到画板中</li>\n<li>非查询SQL功能:编辑非查询SQL任务信息,sql类型选择非查询,如下图所示:<p
align=\"center\">\n <img src=\"/img/sql-node.png\" width=\"80%\"
/>\n</li>\n</ul>\n
</p>\n<ul>\n<li>查询SQL功能:编辑查询SQL任务信息,sql类型选择查询,选择表格或附件形式发送邮件到指定的收件人,如下图所示。</li>\n</ul>\n<p
align=\"center\">\n <img src=\"/img/sql-node2.png\" width=\"80%\" />\n
</p>\n<ul>\n<li>数据源:选择对应的数据源</li>\n<li>sq [...]
+ "__html":
"<h1>SQL</h1>\n<h2>综述</h2>\n<p>SQL任务类型,用于连接数据库并执行相应SQL。</p>\n<h2>创建数据源</h2>\n<p>可参考<a
href=\"../datasource/introduction.md\">数据源中心介绍</a>。</p>\n<h2>创建任务</h2>\n<ul>\n<li>点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。</li>\n<li>工具栏中拖动
<img src=\"/img/tasks/icons/sql.png\" width=\"25\"/>
到画板中,选择需要连接的数据源,即可完成创建。</li>\n</ul>\n<h2>任务参数</h2>\n<ul>\n<li>数据源:选择对应的数据源</li>\n<li>sql类型:支持查询和非查询两种,查询是select类型的查询,是有结果集返回的,可以指定邮件通知为表格、附件或表格附件三种模板。非查询是没有结果集返回的,是针对update、delete、insert三种类型的
[...]
"link": "/dist/zh-cn/docs/2.0.1/user_doc/guide/task/sql.html",
"meta": {}
}
\ No newline at end of file
diff --git a/zh-cn/docs/2.0.2/user_doc/guide/task/sql.html
b/zh-cn/docs/2.0.2/user_doc/guide/task/sql.html
index 093a62b..965fd51 100644
--- a/zh-cn/docs/2.0.2/user_doc/guide/task/sql.html
+++ b/zh-cn/docs/2.0.2/user_doc/guide/task/sql.html
@@ -10,30 +10,36 @@
<link rel="stylesheet" href="/build/vendor.23870e5.css">
</head>
<body>
- <div id="root"><div class="md2html docs-page" data-reactroot=""><header
class="header-container header-container-dark"><div class="header-body"><span
class="mobile-menu-btn mobile-menu-btn-dark"></span><a
href="/zh-cn/index.html"><img class="logo" src="/img/hlogo_white.svg"/></a><div
class="search search-dark"><span class="icon-search"></span></div><span
class="language-switch language-switch-dark">En</span><div
class="header-menu"><div><ul class="ant-menu whiteClass ant-menu-light ant [...]
+ <div id="root"><div class="md2html docs-page" data-reactroot=""><header
class="header-container header-container-dark"><div class="header-body"><span
class="mobile-menu-btn mobile-menu-btn-dark"></span><a
href="/zh-cn/index.html"><img class="logo" src="/img/hlogo_white.svg"/></a><div
class="search search-dark"><span class="icon-search"></span></div><span
class="language-switch language-switch-dark">En</span><div
class="header-menu"><div><ul class="ant-menu whiteClass ant-menu-light ant [...]
+<h2>综述</h2>
+<p>SQL任务类型,用于连接数据库并执行相应SQL。</p>
+<h2>创建数据源</h2>
+<p>可参考<a href="../datasource/introduction.md">数据源中心介绍</a>。</p>
+<h2>创建任务</h2>
<ul>
-<li>拖动工具栏中的<img
src="https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png"
alt="PNG">任务节点到画板中</li>
-<li>非查询SQL功能:编辑非查询SQL任务信息,sql类型选择非查询,如下图所示:<p align="center">
- <img src="/img/sql-node.png" width="80%" />
-</li>
+<li>点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。</li>
+<li>工具栏中拖动 <img src="/img/tasks/icons/sql.png" width="25"/>
到画板中,选择需要连接的数据源,即可完成创建。</li>
</ul>
- </p>
-<ul>
-<li>查询SQL功能:编辑查询SQL任务信息,sql类型选择查询,选择表格或附件形式发送邮件到指定的收件人,如下图所示。</li>
-</ul>
-<p align="center">
- <img src="/img/sql-node2.png" width="80%" />
- </p>
+<h2>任务参数</h2>
<ul>
<li>数据源:选择对应的数据源</li>
<li>sql类型:支持查询和非查询两种,查询是select类型的查询,是有结果集返回的,可以指定邮件通知为表格、附件或表格附件三种模板。非查询是没有结果集返回的,是针对update、delete、insert三种类型的操作。</li>
<li>sql参数:输入参数格式为key1=value1;key2=value2…</li>
<li>sql语句:SQL语句</li>
-<li>UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。</li>
+<li>UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。</li>
<li>自定义参数:SQL任务类型,而存储过程是自定义参数顺序的给方法设置值自定义参数类型和数据类型同存储过程任务类型一样。区别在于SQL任务类型自定义参数会替换sql语句中${变量}。</li>
<li>前置sql:前置sql在sql语句之前执行。</li>
<li>后置sql:后置sql在sql语句之后执行。</li>
</ul>
+<h2>任务样例</h2>
+<h3>在hive中创建临时表并写入数据</h3>
+<p>该样例向hive中创建临时表<code>tmp_hello_world</code>并写入一行数据。选择SQL类型为非查询,在创建临时表之前需要确保该表不存在,所以我们使用自定义参数,在每次运行时获取当天时间作为表名后缀,这样这个任务就可以每天运行。创建的表名格式为:<code>tmp_hello_world_{yyyyMMdd}</code>。</p>
+<p><img src="/img/tasks/demo/hive-sql.png" alt="hive-sql"></p>
+<h3>运行该任务成功之后在hive中查询结果</h3>
+<p>登录集群使用<code>hive</code>命令或使用<code>beeline</code>、<code>JDBC</code>等方式连接<code>apache
hive</code>进行查询,查询SQL为<code>select * from
tmp_hello_world_{yyyyMMdd}</code>,请将<code>{yyyyMMdd}</code>替换为运行当天的日期,查询截图如下:</p>
+<p><img src="/img/tasks/demo/hive-result.png" alt="hive-sql"></p>
+<h2>注意事项</h2>
+<p>注意SQL类型的选择,如果是INSERT等操作需要选择非查询类型。</p>
</div></section><footer class="footer-container"><div
class="footer-body"><div><h3>联系我们</h3><h4>有问题需要反馈?请通过以下方式联系我们。</h4></div><div
class="contact-container"><ul><li><a
href="/zh-cn/community/development/subscribe.html"><img class="img-base"
src="/img/emailgray.png"/><img class="img-change"
src="/img/emailblue.png"/><p>邮件列表</p></a></li><li><a
href="https://twitter.com/dolphinschedule"><img class="img-base"
src="/img/twittergray.png"/><img class="img-change"
src="/img/twitterblue.png"/><p [...]
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-with-addons.min.js"></script>
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-dom.min.js"></script>
diff --git a/zh-cn/docs/2.0.2/user_doc/guide/task/sql.json
b/zh-cn/docs/2.0.2/user_doc/guide/task/sql.json
index f982d09..1b34e7d 100644
--- a/zh-cn/docs/2.0.2/user_doc/guide/task/sql.json
+++ b/zh-cn/docs/2.0.2/user_doc/guide/task/sql.json
@@ -1,6 +1,6 @@
{
"filename": "sql.md",
- "__html": "<h1>SQL节点</h1>\n<ul>\n<li>拖动工具栏中的<img
src=\"https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png\"
alt=\"PNG\">任务节点到画板中</li>\n<li>非查询SQL功能:编辑非查询SQL任务信息,sql类型选择非查询,如下图所示:<p
align=\"center\">\n <img src=\"/img/sql-node.png\" width=\"80%\"
/>\n</li>\n</ul>\n
</p>\n<ul>\n<li>查询SQL功能:编辑查询SQL任务信息,sql类型选择查询,选择表格或附件形式发送邮件到指定的收件人,如下图所示。</li>\n</ul>\n<p
align=\"center\">\n <img src=\"/img/sql-node2.png\" width=\"80%\" />\n
</p>\n<ul>\n<li>数据源:选择对应的数据源</li>\n<li>sq [...]
+ "__html":
"<h1>SQL</h1>\n<h2>综述</h2>\n<p>SQL任务类型,用于连接数据库并执行相应SQL。</p>\n<h2>创建数据源</h2>\n<p>可参考<a
href=\"../datasource/introduction.md\">数据源中心介绍</a>。</p>\n<h2>创建任务</h2>\n<ul>\n<li>点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。</li>\n<li>工具栏中拖动
<img src=\"/img/tasks/icons/sql.png\" width=\"25\"/>
到画板中,选择需要连接的数据源,即可完成创建。</li>\n</ul>\n<h2>任务参数</h2>\n<ul>\n<li>数据源:选择对应的数据源</li>\n<li>sql类型:支持查询和非查询两种,查询是select类型的查询,是有结果集返回的,可以指定邮件通知为表格、附件或表格附件三种模板。非查询是没有结果集返回的,是针对update、delete、insert三种类型的
[...]
"link": "/dist/zh-cn/docs/2.0.2/user_doc/guide/task/sql.html",
"meta": {}
}
\ No newline at end of file
diff --git a/zh-cn/docs/2.0.3/user_doc/guide/task/sql.html
b/zh-cn/docs/2.0.3/user_doc/guide/task/sql.html
index 70e8a9b..6809cb8 100644
--- a/zh-cn/docs/2.0.3/user_doc/guide/task/sql.html
+++ b/zh-cn/docs/2.0.3/user_doc/guide/task/sql.html
@@ -10,30 +10,36 @@
<link rel="stylesheet" href="/build/vendor.23870e5.css">
</head>
<body>
- <div id="root"><div class="md2html docs-page" data-reactroot=""><header
class="header-container header-container-dark"><div class="header-body"><span
class="mobile-menu-btn mobile-menu-btn-dark"></span><a
href="/zh-cn/index.html"><img class="logo" src="/img/hlogo_white.svg"/></a><div
class="search search-dark"><span class="icon-search"></span></div><span
class="language-switch language-switch-dark">En</span><div
class="header-menu"><div><ul class="ant-menu whiteClass ant-menu-light ant [...]
+ <div id="root"><div class="md2html docs-page" data-reactroot=""><header
class="header-container header-container-dark"><div class="header-body"><span
class="mobile-menu-btn mobile-menu-btn-dark"></span><a
href="/zh-cn/index.html"><img class="logo" src="/img/hlogo_white.svg"/></a><div
class="search search-dark"><span class="icon-search"></span></div><span
class="language-switch language-switch-dark">En</span><div
class="header-menu"><div><ul class="ant-menu whiteClass ant-menu-light ant [...]
+<h2>综述</h2>
+<p>SQL任务类型,用于连接数据库并执行相应SQL。</p>
+<h2>创建数据源</h2>
+<p>可参考<a href="../datasource/introduction.md">数据源中心介绍</a>。</p>
+<h2>创建任务</h2>
<ul>
-<li>拖动工具栏中的<img
src="https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png"
alt="PNG">任务节点到画板中</li>
-<li>非查询SQL功能:编辑非查询SQL任务信息,sql类型选择非查询,如下图所示:<p align="center">
- <img src="/img/sql-node.png" width="80%" />
-</li>
+<li>点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。</li>
+<li>工具栏中拖动 <img src="/img/tasks/icons/sql.png" width="25"/>
到画板中,选择需要连接的数据源,即可完成创建。</li>
</ul>
- </p>
-<ul>
-<li>查询SQL功能:编辑查询SQL任务信息,sql类型选择查询,选择表格或附件形式发送邮件到指定的收件人,如下图所示。</li>
-</ul>
-<p align="center">
- <img src="/img/sql-node2.png" width="80%" />
- </p>
+<h2>任务参数</h2>
<ul>
<li>数据源:选择对应的数据源</li>
<li>sql类型:支持查询和非查询两种,查询是select类型的查询,是有结果集返回的,可以指定邮件通知为表格、附件或表格附件三种模板。非查询是没有结果集返回的,是针对update、delete、insert三种类型的操作。</li>
<li>sql参数:输入参数格式为key1=value1;key2=value2…</li>
<li>sql语句:SQL语句</li>
-<li>UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。</li>
+<li>UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。</li>
<li>自定义参数:SQL任务类型,而存储过程是自定义参数顺序的给方法设置值自定义参数类型和数据类型同存储过程任务类型一样。区别在于SQL任务类型自定义参数会替换sql语句中${变量}。</li>
<li>前置sql:前置sql在sql语句之前执行。</li>
<li>后置sql:后置sql在sql语句之后执行。</li>
</ul>
+<h2>任务样例</h2>
+<h3>在hive中创建临时表并写入数据</h3>
+<p>该样例向hive中创建临时表<code>tmp_hello_world</code>并写入一行数据。选择SQL类型为非查询,在创建临时表之前需要确保该表不存在,所以我们使用自定义参数,在每次运行时获取当天时间作为表名后缀,这样这个任务就可以每天运行。创建的表名格式为:<code>tmp_hello_world_{yyyyMMdd}</code>。</p>
+<p><img src="/img/tasks/demo/hive-sql.png" alt="hive-sql"></p>
+<h3>运行该任务成功之后在hive中查询结果</h3>
+<p>登录集群使用<code>hive</code>命令或使用<code>beeline</code>、<code>JDBC</code>等方式连接<code>apache
hive</code>进行查询,查询SQL为<code>select * from
tmp_hello_world_{yyyyMMdd}</code>,请将<code>{yyyyMMdd}</code>替换为运行当天的日期,查询截图如下:</p>
+<p><img src="/img/tasks/demo/hive-result.png" alt="hive-sql"></p>
+<h2>注意事项</h2>
+<p>注意SQL类型的选择,如果是INSERT等操作需要选择非查询类型。</p>
</div></section><footer class="footer-container"><div
class="footer-body"><div><h3>联系我们</h3><h4>有问题需要反馈?请通过以下方式联系我们。</h4></div><div
class="contact-container"><ul><li><a
href="/zh-cn/community/development/subscribe.html"><img class="img-base"
src="/img/emailgray.png"/><img class="img-change"
src="/img/emailblue.png"/><p>邮件列表</p></a></li><li><a
href="https://twitter.com/dolphinschedule"><img class="img-base"
src="/img/twittergray.png"/><img class="img-change"
src="/img/twitterblue.png"/><p [...]
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-with-addons.min.js"></script>
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-dom.min.js"></script>
diff --git a/zh-cn/docs/2.0.3/user_doc/guide/task/sql.json
b/zh-cn/docs/2.0.3/user_doc/guide/task/sql.json
index e367f1c..30823e2 100644
--- a/zh-cn/docs/2.0.3/user_doc/guide/task/sql.json
+++ b/zh-cn/docs/2.0.3/user_doc/guide/task/sql.json
@@ -1,6 +1,6 @@
{
"filename": "sql.md",
- "__html": "<h1>SQL节点</h1>\n<ul>\n<li>拖动工具栏中的<img
src=\"https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png\"
alt=\"PNG\">任务节点到画板中</li>\n<li>非查询SQL功能:编辑非查询SQL任务信息,sql类型选择非查询,如下图所示:<p
align=\"center\">\n <img src=\"/img/sql-node.png\" width=\"80%\"
/>\n</li>\n</ul>\n
</p>\n<ul>\n<li>查询SQL功能:编辑查询SQL任务信息,sql类型选择查询,选择表格或附件形式发送邮件到指定的收件人,如下图所示。</li>\n</ul>\n<p
align=\"center\">\n <img src=\"/img/sql-node2.png\" width=\"80%\" />\n
</p>\n<ul>\n<li>数据源:选择对应的数据源</li>\n<li>sq [...]
+ "__html":
"<h1>SQL</h1>\n<h2>综述</h2>\n<p>SQL任务类型,用于连接数据库并执行相应SQL。</p>\n<h2>创建数据源</h2>\n<p>可参考<a
href=\"../datasource/introduction.md\">数据源中心介绍</a>。</p>\n<h2>创建任务</h2>\n<ul>\n<li>点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。</li>\n<li>工具栏中拖动
<img src=\"/img/tasks/icons/sql.png\" width=\"25\"/>
到画板中,选择需要连接的数据源,即可完成创建。</li>\n</ul>\n<h2>任务参数</h2>\n<ul>\n<li>数据源:选择对应的数据源</li>\n<li>sql类型:支持查询和非查询两种,查询是select类型的查询,是有结果集返回的,可以指定邮件通知为表格、附件或表格附件三种模板。非查询是没有结果集返回的,是针对update、delete、insert三种类型的
[...]
"link": "/dist/zh-cn/docs/2.0.3/user_doc/guide/task/sql.html",
"meta": {}
}
\ No newline at end of file
diff --git a/zh-cn/docs/dev/user_doc/guide/task/sql.html
b/zh-cn/docs/dev/user_doc/guide/task/sql.html
index a2e17a9..0b704b7 100644
--- a/zh-cn/docs/dev/user_doc/guide/task/sql.html
+++ b/zh-cn/docs/dev/user_doc/guide/task/sql.html
@@ -10,30 +10,36 @@
<link rel="stylesheet" href="/build/vendor.23870e5.css">
</head>
<body>
- <div id="root"><div class="md2html docs-page" data-reactroot=""><header
class="header-container header-container-dark"><div class="header-body"><span
class="mobile-menu-btn mobile-menu-btn-dark"></span><a
href="/zh-cn/index.html"><img class="logo" src="/img/hlogo_white.svg"/></a><div
class="search search-dark"><span class="icon-search"></span></div><span
class="language-switch language-switch-dark">En</span><div
class="header-menu"><div><ul class="ant-menu whiteClass ant-menu-light ant [...]
+ <div id="root"><div class="md2html docs-page" data-reactroot=""><header
class="header-container header-container-dark"><div class="header-body"><span
class="mobile-menu-btn mobile-menu-btn-dark"></span><a
href="/zh-cn/index.html"><img class="logo" src="/img/hlogo_white.svg"/></a><div
class="search search-dark"><span class="icon-search"></span></div><span
class="language-switch language-switch-dark">En</span><div
class="header-menu"><div><ul class="ant-menu whiteClass ant-menu-light ant [...]
+<h2>综述</h2>
+<p>SQL任务类型,用于连接数据库并执行相应SQL。</p>
+<h2>创建数据源</h2>
+<p>可参考<a href="../datasource/introduction.md">数据源中心介绍</a>。</p>
+<h2>创建任务</h2>
<ul>
-<li>拖动工具栏中的<img
src="https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png"
alt="PNG">任务节点到画板中</li>
-<li>非查询SQL功能:编辑非查询SQL任务信息,sql类型选择非查询,如下图所示:<p align="center">
- <img src="/img/sql-node.png" width="80%" />
-</li>
+<li>点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。</li>
+<li>工具栏中拖动 <img src="/img/tasks/icons/sql.png" width="25"/>
到画板中,选择需要连接的数据源,即可完成创建。</li>
</ul>
- </p>
-<ul>
-<li>查询SQL功能:编辑查询SQL任务信息,sql类型选择查询,选择表格或附件形式发送邮件到指定的收件人,如下图所示。</li>
-</ul>
-<p align="center">
- <img src="/img/sql-node2.png" width="80%" />
- </p>
+<h2>任务参数</h2>
<ul>
<li>数据源:选择对应的数据源</li>
<li>sql类型:支持查询和非查询两种,查询是select类型的查询,是有结果集返回的,可以指定邮件通知为表格、附件或表格附件三种模板。非查询是没有结果集返回的,是针对update、delete、insert三种类型的操作。</li>
<li>sql参数:输入参数格式为key1=value1;key2=value2…</li>
<li>sql语句:SQL语句</li>
-<li>UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。</li>
+<li>UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。</li>
<li>自定义参数:SQL任务类型,而存储过程是自定义参数顺序的给方法设置值自定义参数类型和数据类型同存储过程任务类型一样。区别在于SQL任务类型自定义参数会替换sql语句中${变量}。</li>
<li>前置sql:前置sql在sql语句之前执行。</li>
<li>后置sql:后置sql在sql语句之后执行。</li>
</ul>
+<h2>任务样例</h2>
+<h3>在hive中创建临时表并写入数据</h3>
+<p>该样例向hive中创建临时表<code>tmp_hello_world</code>并写入一行数据。选择SQL类型为非查询,在创建临时表之前需要确保该表不存在,所以我们使用自定义参数,在每次运行时获取当天时间作为表名后缀,这样这个任务就可以每天运行。创建的表名格式为:<code>tmp_hello_world_{yyyyMMdd}</code>。</p>
+<p><img src="/img/tasks/demo/hive-sql.png" alt="hive-sql"></p>
+<h3>运行该任务成功之后在hive中查询结果</h3>
+<p>登录集群使用<code>hive</code>命令或使用<code>beeline</code>、<code>JDBC</code>等方式连接<code>apache
hive</code>进行查询,查询SQL为<code>select * from
tmp_hello_world_{yyyyMMdd}</code>,请将<code>{yyyyMMdd}</code>替换为运行当天的日期,查询截图如下:</p>
+<p><img src="/img/tasks/demo/hive-result.png" alt="hive-sql"></p>
+<h2>注意事项</h2>
+<p>注意SQL类型的选择,如果是INSERT等操作需要选择非查询类型。</p>
</div></section><footer class="footer-container"><div
class="footer-body"><div><h3>联系我们</h3><h4>有问题需要反馈?请通过以下方式联系我们。</h4></div><div
class="contact-container"><ul><li><a
href="/zh-cn/community/development/subscribe.html"><img class="img-base"
src="/img/emailgray.png"/><img class="img-change"
src="/img/emailblue.png"/><p>邮件列表</p></a></li><li><a
href="https://twitter.com/dolphinschedule"><img class="img-base"
src="/img/twittergray.png"/><img class="img-change"
src="/img/twitterblue.png"/><p [...]
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-with-addons.min.js"></script>
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-dom.min.js"></script>
diff --git a/zh-cn/docs/dev/user_doc/guide/task/sql.json
b/zh-cn/docs/dev/user_doc/guide/task/sql.json
index 9c96c49..71b4a07 100644
--- a/zh-cn/docs/dev/user_doc/guide/task/sql.json
+++ b/zh-cn/docs/dev/user_doc/guide/task/sql.json
@@ -1,6 +1,6 @@
{
"filename": "sql.md",
- "__html": "<h1>SQL节点</h1>\n<ul>\n<li>拖动工具栏中的<img
src=\"https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png\"
alt=\"PNG\">任务节点到画板中</li>\n<li>非查询SQL功能:编辑非查询SQL任务信息,sql类型选择非查询,如下图所示:<p
align=\"center\">\n <img src=\"/img/sql-node.png\" width=\"80%\"
/>\n</li>\n</ul>\n
</p>\n<ul>\n<li>查询SQL功能:编辑查询SQL任务信息,sql类型选择查询,选择表格或附件形式发送邮件到指定的收件人,如下图所示。</li>\n</ul>\n<p
align=\"center\">\n <img src=\"/img/sql-node2.png\" width=\"80%\" />\n
</p>\n<ul>\n<li>数据源:选择对应的数据源</li>\n<li>sq [...]
+ "__html":
"<h1>SQL</h1>\n<h2>综述</h2>\n<p>SQL任务类型,用于连接数据库并执行相应SQL。</p>\n<h2>创建数据源</h2>\n<p>可参考<a
href=\"../datasource/introduction.md\">数据源中心介绍</a>。</p>\n<h2>创建任务</h2>\n<ul>\n<li>点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。</li>\n<li>工具栏中拖动
<img src=\"/img/tasks/icons/sql.png\" width=\"25\"/>
到画板中,选择需要连接的数据源,即可完成创建。</li>\n</ul>\n<h2>任务参数</h2>\n<ul>\n<li>数据源:选择对应的数据源</li>\n<li>sql类型:支持查询和非查询两种,查询是select类型的查询,是有结果集返回的,可以指定邮件通知为表格、附件或表格附件三种模板。非查询是没有结果集返回的,是针对update、delete、insert三种类型的
[...]
"link": "/dist/zh-cn/docs/dev/user_doc/guide/task/sql.html",
"meta": {}
}
\ No newline at end of file
diff --git a/zh-cn/docs/latest/user_doc/guide/task/sql.html
b/zh-cn/docs/latest/user_doc/guide/task/sql.html
index 70e8a9b..6809cb8 100644
--- a/zh-cn/docs/latest/user_doc/guide/task/sql.html
+++ b/zh-cn/docs/latest/user_doc/guide/task/sql.html
@@ -10,30 +10,36 @@
<link rel="stylesheet" href="/build/vendor.23870e5.css">
</head>
<body>
- <div id="root"><div class="md2html docs-page" data-reactroot=""><header
class="header-container header-container-dark"><div class="header-body"><span
class="mobile-menu-btn mobile-menu-btn-dark"></span><a
href="/zh-cn/index.html"><img class="logo" src="/img/hlogo_white.svg"/></a><div
class="search search-dark"><span class="icon-search"></span></div><span
class="language-switch language-switch-dark">En</span><div
class="header-menu"><div><ul class="ant-menu whiteClass ant-menu-light ant [...]
+ <div id="root"><div class="md2html docs-page" data-reactroot=""><header
class="header-container header-container-dark"><div class="header-body"><span
class="mobile-menu-btn mobile-menu-btn-dark"></span><a
href="/zh-cn/index.html"><img class="logo" src="/img/hlogo_white.svg"/></a><div
class="search search-dark"><span class="icon-search"></span></div><span
class="language-switch language-switch-dark">En</span><div
class="header-menu"><div><ul class="ant-menu whiteClass ant-menu-light ant [...]
+<h2>综述</h2>
+<p>SQL任务类型,用于连接数据库并执行相应SQL。</p>
+<h2>创建数据源</h2>
+<p>可参考<a href="../datasource/introduction.md">数据源中心介绍</a>。</p>
+<h2>创建任务</h2>
<ul>
-<li>拖动工具栏中的<img
src="https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png"
alt="PNG">任务节点到画板中</li>
-<li>非查询SQL功能:编辑非查询SQL任务信息,sql类型选择非查询,如下图所示:<p align="center">
- <img src="/img/sql-node.png" width="80%" />
-</li>
+<li>点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。</li>
+<li>工具栏中拖动 <img src="/img/tasks/icons/sql.png" width="25"/>
到画板中,选择需要连接的数据源,即可完成创建。</li>
</ul>
- </p>
-<ul>
-<li>查询SQL功能:编辑查询SQL任务信息,sql类型选择查询,选择表格或附件形式发送邮件到指定的收件人,如下图所示。</li>
-</ul>
-<p align="center">
- <img src="/img/sql-node2.png" width="80%" />
- </p>
+<h2>任务参数</h2>
<ul>
<li>数据源:选择对应的数据源</li>
<li>sql类型:支持查询和非查询两种,查询是select类型的查询,是有结果集返回的,可以指定邮件通知为表格、附件或表格附件三种模板。非查询是没有结果集返回的,是针对update、delete、insert三种类型的操作。</li>
<li>sql参数:输入参数格式为key1=value1;key2=value2…</li>
<li>sql语句:SQL语句</li>
-<li>UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。</li>
+<li>UDF函数:对于HIVE类型的数据源,可以引用资源中心中创建的UDF函数,其他类型的数据源暂不支持UDF函数。</li>
<li>自定义参数:SQL任务类型,而存储过程是自定义参数顺序的给方法设置值自定义参数类型和数据类型同存储过程任务类型一样。区别在于SQL任务类型自定义参数会替换sql语句中${变量}。</li>
<li>前置sql:前置sql在sql语句之前执行。</li>
<li>后置sql:后置sql在sql语句之后执行。</li>
</ul>
+<h2>任务样例</h2>
+<h3>在hive中创建临时表并写入数据</h3>
+<p>该样例向hive中创建临时表<code>tmp_hello_world</code>并写入一行数据。选择SQL类型为非查询,在创建临时表之前需要确保该表不存在,所以我们使用自定义参数,在每次运行时获取当天时间作为表名后缀,这样这个任务就可以每天运行。创建的表名格式为:<code>tmp_hello_world_{yyyyMMdd}</code>。</p>
+<p><img src="/img/tasks/demo/hive-sql.png" alt="hive-sql"></p>
+<h3>运行该任务成功之后在hive中查询结果</h3>
+<p>登录集群使用<code>hive</code>命令或使用<code>beeline</code>、<code>JDBC</code>等方式连接<code>apache
hive</code>进行查询,查询SQL为<code>select * from
tmp_hello_world_{yyyyMMdd}</code>,请将<code>{yyyyMMdd}</code>替换为运行当天的日期,查询截图如下:</p>
+<p><img src="/img/tasks/demo/hive-result.png" alt="hive-sql"></p>
+<h2>注意事项</h2>
+<p>注意SQL类型的选择,如果是INSERT等操作需要选择非查询类型。</p>
</div></section><footer class="footer-container"><div
class="footer-body"><div><h3>联系我们</h3><h4>有问题需要反馈?请通过以下方式联系我们。</h4></div><div
class="contact-container"><ul><li><a
href="/zh-cn/community/development/subscribe.html"><img class="img-base"
src="/img/emailgray.png"/><img class="img-change"
src="/img/emailblue.png"/><p>邮件列表</p></a></li><li><a
href="https://twitter.com/dolphinschedule"><img class="img-base"
src="/img/twittergray.png"/><img class="img-change"
src="/img/twitterblue.png"/><p [...]
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-with-addons.min.js"></script>
<script
src="//cdn.jsdelivr.net/npm/[email protected]/dist/react-dom.min.js"></script>
diff --git a/zh-cn/docs/latest/user_doc/guide/task/sql.json
b/zh-cn/docs/latest/user_doc/guide/task/sql.json
index e367f1c..30823e2 100644
--- a/zh-cn/docs/latest/user_doc/guide/task/sql.json
+++ b/zh-cn/docs/latest/user_doc/guide/task/sql.json
@@ -1,6 +1,6 @@
{
"filename": "sql.md",
- "__html": "<h1>SQL节点</h1>\n<ul>\n<li>拖动工具栏中的<img
src=\"https://analysys.github.io/easyscheduler_docs_cn/images/toolbar_SQL.png\"
alt=\"PNG\">任务节点到画板中</li>\n<li>非查询SQL功能:编辑非查询SQL任务信息,sql类型选择非查询,如下图所示:<p
align=\"center\">\n <img src=\"/img/sql-node.png\" width=\"80%\"
/>\n</li>\n</ul>\n
</p>\n<ul>\n<li>查询SQL功能:编辑查询SQL任务信息,sql类型选择查询,选择表格或附件形式发送邮件到指定的收件人,如下图所示。</li>\n</ul>\n<p
align=\"center\">\n <img src=\"/img/sql-node2.png\" width=\"80%\" />\n
</p>\n<ul>\n<li>数据源:选择对应的数据源</li>\n<li>sq [...]
+ "__html":
"<h1>SQL</h1>\n<h2>综述</h2>\n<p>SQL任务类型,用于连接数据库并执行相应SQL。</p>\n<h2>创建数据源</h2>\n<p>可参考<a
href=\"../datasource/introduction.md\">数据源中心介绍</a>。</p>\n<h2>创建任务</h2>\n<ul>\n<li>点击项目管理-项目名称-工作流定义,点击"创建工作流"按钮,进入DAG编辑页面。</li>\n<li>工具栏中拖动
<img src=\"/img/tasks/icons/sql.png\" width=\"25\"/>
到画板中,选择需要连接的数据源,即可完成创建。</li>\n</ul>\n<h2>任务参数</h2>\n<ul>\n<li>数据源:选择对应的数据源</li>\n<li>sql类型:支持查询和非查询两种,查询是select类型的查询,是有结果集返回的,可以指定邮件通知为表格、附件或表格附件三种模板。非查询是没有结果集返回的,是针对update、delete、insert三种类型的
[...]
"link": "/dist/zh-cn/docs/2.0.3/user_doc/guide/task/sql.html",
"meta": {}
}
\ No newline at end of file