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 e28907a59 Automated deployment: 
bd5d4b4eadf206439824a437649690f6710ca0d8
e28907a59 is described below

commit e28907a59e5cee2ff40a03d3e8a5d372369aa983
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu May 26 05:09:46 2022 +0000

    Automated deployment: bd5d4b4eadf206439824a437649690f6710ca0d8
---
 en-us/docs/dev/user_doc/guide/parameter/local.html |  37 +++++++++++++++++++++
 en-us/docs/dev/user_doc/guide/parameter/local.json |   2 +-
 img/new_ui/dev/parameter/local_param_set_val.png   | Bin 0 -> 22422 bytes
 .../dev/parameter/local_param_set_val_bash.png     | Bin 0 -> 33232 bytes
 .../dev/parameter/local_param_set_val_custom.png   | Bin 0 -> 50476 bytes
 zh-cn/docs/dev/user_doc/guide/parameter/local.html |  33 ++++++++++++++++++
 zh-cn/docs/dev/user_doc/guide/parameter/local.json |   2 +-
 7 files changed, 72 insertions(+), 2 deletions(-)

diff --git a/en-us/docs/dev/user_doc/guide/parameter/local.html 
b/en-us/docs/dev/user_doc/guide/parameter/local.html
index 63f618fda..ec12e126f 100644
--- a/en-us/docs/dev/user_doc/guide/parameter/local.html
+++ b/en-us/docs/dev/user_doc/guide/parameter/local.html
@@ -14,8 +14,19 @@
 <h2>Scope</h2>
 <p>Parameters configured on the task definition page, the scope of this 
parameter is inside this task only. But if you configure according to <a 
href="context.md">Refer to Parameter Context</a>, it could pass to downstream 
tasks.</p>
 <h2>Usage</h2>
+<ul>
+<li>If you want to use parameter in single task, see <a 
href="#use-local-parameter-by-custom-parameter">local parameter with custom 
parameter</a></li>
+<li>If you want to use set parameter in task and use them in downstream tasks:
+<ul>
+<li>For simple use without using custom parameter, see <a 
href="#export-local-parameter-by-setvalue">export parameter via 
<code>setValue</code></a></li>
+<li>Using custom parameter, see <a 
href="#export-local-parameter-by-setvalue-and-custom-parameter">export 
parameter via <code>setValue</code> and custom parameter</a></li>
+<li>Using bash variable, see <a 
href="#export-local-parameter-by-setvalue-and-bash-variable">export parameter 
via <code>setValue</code> and bash variable</a></li>
+</ul>
+</li>
+</ul>
 <p>Usage of local parameters is: at the task define page, click the '+' beside 
the 'Custom Parameters' and fill in the key and value to save.</p>
 <h2>Examples</h2>
+<h3>Use Local Parameter by Custom Parameter</h3>
 <p>This example shows how to use local parameters to print the current date. 
Create a Shell task and write a script with the content <code>echo 
${dt}</code>. Click <strong>custom parameter</strong> in the configuration bar, 
and the configuration is as follows:</p>
 <p><img src="/img/new_ui/dev/parameter/local_parameter01.png" 
alt="local-parameter01"></p>
 <p>Parameters:</p>
@@ -30,6 +41,32 @@
 <blockquote>
 <p>Note: The local parameter can be used in the workflow of the current task 
node. If it is set to OUT, it can be passed to the downstream workflow. Please 
refer to: <a href="context.md">Parameter Context</a></p>
 </blockquote>
+<h3>Export Local Parameter by <code>setValue</code></h3>
+<p>If you want to simple export parameters and then use them in downstream 
tasks, you could use <code>setValue</code> in your task, which
+you can manage your parameters into one single task. You can use syntax 
<code>echo '${setValue(set_val=123)}'</code>(<strong>do not forget the
+single quote</strong>) in Shell task and add new <code>OUT</code> custom 
parameter to export it.</p>
+<p><img src="/img/new_ui/dev/parameter/local_param_set_val.png" 
alt="local-parameter-set-val"></p>
+<p>You could get this value in downstream task using syntax <code>echo 
'${set_val}'</code>.</p>
+<h3>Export Local Parameter by <code>setValue</code> and Custom Parameter</h3>
+<p>If you want to export parameters with custom parameter instead of constants 
value, and then use them in downstream tasks,
+you could use <code>setValue</code> in your task, which easier to maintain by 
change &quot;custom parameter&quot; block when you want to
+change its value. You can use syntax <code>echo 
&quot;#{setValue(set_val_param=${val})}&quot;</code>(<strong>do not forget the 
double quote, if you are
+using any variable with <code>setValue</code></strong>) in Shell task and add 
new <code>IN</code> custom parameter for input variable <code>val</code> and 
<code>OUT</code> custom
+parameter for exporting parameter <code>set_val_param</code>.</p>
+<p><img src="/img/new_ui/dev/parameter/local_param_set_val_custom.png" 
alt="local-parameter-set-val-param"></p>
+<p>You could get this value in downstream task using syntax <code>echo 
'${set_val_param}'</code>.</p>
+<h3>Export Local Parameter by <code>setValue</code> and Bash Variable</h3>
+<p>If you want to export parameters with bash variable instead of constants 
value, and then use them in downstream tasks,
+you could use <code>setValue</code> in your task, which more flexible such as 
you can get variable for exists local or HTTP resource.
+You can use syntax like</p>
+<pre><code class="language-shell">lines_num=$(wget 
https://raw.githubusercontent.com/apache/dolphinscheduler/dev/README.md -q -O - 
| wc -l | xargs)
+echo &quot;#{setValue(set_val_var=${lines_num})}&quot;
+</code></pre>
+<p>in Shell task(<strong>do not forget the double quote, if you are using any 
variable with <code>setValue</code></strong>) and add <code>OUT</code> custom 
parameter
+for exporting parameter <code>set_val_var</code>
+.</p>
+<p><img src="/img/new_ui/dev/parameter/local_param_set_val_bash.png" 
alt="local-parameter-set-val-bash"></p>
+<p>You could get this value in downstream task using syntax <code>echo 
'${set_val_var}'</code>.</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/parameter/local.json 
b/en-us/docs/dev/user_doc/guide/parameter/local.json
index 39dafd353..04aa81351 100644
--- a/en-us/docs/dev/user_doc/guide/parameter/local.json
+++ b/en-us/docs/dev/user_doc/guide/parameter/local.json
@@ -1,6 +1,6 @@
 {
   "filename": "local.md",
-  "__html": "<h1>Local Parameter</h1>\n<h2>Scope</h2>\n<p>Parameters 
configured on the task definition page, the scope of this parameter is inside 
this task only. But if you configure according to <a href=\"context.md\">Refer 
to Parameter Context</a>, it could pass to downstream 
tasks.</p>\n<h2>Usage</h2>\n<p>Usage of local parameters is: at the task define 
page, click the '+' beside the 'Custom Parameters' and fill in the key and 
value to save.</p>\n<h2>Examples</h2>\n<p>This example sh [...]
+  "__html": "<h1>Local Parameter</h1>\n<h2>Scope</h2>\n<p>Parameters 
configured on the task definition page, the scope of this parameter is inside 
this task only. But if you configure according to <a href=\"context.md\">Refer 
to Parameter Context</a>, it could pass to downstream 
tasks.</p>\n<h2>Usage</h2>\n<ul>\n<li>If you want to use parameter in single 
task, see <a href=\"#use-local-parameter-by-custom-parameter\">local parameter 
with custom parameter</a></li>\n<li>If you want to use s [...]
   "link": "/dist/en-us/docs/dev/user_doc/guide/parameter/local.html",
   "meta": {}
 }
\ No newline at end of file
diff --git a/img/new_ui/dev/parameter/local_param_set_val.png 
b/img/new_ui/dev/parameter/local_param_set_val.png
new file mode 100644
index 000000000..c44e63e29
Binary files /dev/null and b/img/new_ui/dev/parameter/local_param_set_val.png 
differ
diff --git a/img/new_ui/dev/parameter/local_param_set_val_bash.png 
b/img/new_ui/dev/parameter/local_param_set_val_bash.png
new file mode 100644
index 000000000..7c0f17976
Binary files /dev/null and 
b/img/new_ui/dev/parameter/local_param_set_val_bash.png differ
diff --git a/img/new_ui/dev/parameter/local_param_set_val_custom.png 
b/img/new_ui/dev/parameter/local_param_set_val_custom.png
new file mode 100644
index 000000000..cdfa557b4
Binary files /dev/null and 
b/img/new_ui/dev/parameter/local_param_set_val_custom.png differ
diff --git a/zh-cn/docs/dev/user_doc/guide/parameter/local.html 
b/zh-cn/docs/dev/user_doc/guide/parameter/local.html
index c15ea73fd..5354ccb42 100644
--- a/zh-cn/docs/dev/user_doc/guide/parameter/local.html
+++ b/zh-cn/docs/dev/user_doc/guide/parameter/local.html
@@ -15,7 +15,18 @@
 <p>在任务定义页面配置的参数,默认作用域仅限该任务,如果配置了<a 
href="context.md">参数传递</a>则可将该参数作用到下游任务中。</p>
 <h2>使用方式</h2>
 <p>本地参数配置方式如下:在任务定义页面,点击“自定义参数”右边的加号,填写对应的变量名称和对应的值,保存即可。</p>
+<ul>
+<li>如果要在单个任务中使用参数,请参阅通过自定义参数使用</li>
+<li>如果要在任务中使用配置参数并在下游任务中使用它们:
+<ul>
+<li>如果你只是想要简单使用,且不使用自定义参数, 请参阅 通过 <code>setValue</code> 和自定义参数 export 本地参数</li>
+<li>如果想要使用自定义参数, 请参阅 通过 <code>setValue</code> 和自定义参数 export 本地参数</li>
+<li>如果想要使用 Bash 参数, 请参阅 通过 <code>setValue</code> 和 Bash 环境变量参数 export 本地参数</li>
+</ul>
+</li>
+</ul>
 <h2>任务样例</h2>
+<h3>通过自定义参数使用</h3>
 <p>本样例展示了如何使用本地参数,打印输出当前日期。创建一个 Shell 任务,并编写脚本内容为 <code>echo 
${dt}</code>。点击配置栏中的<strong>自定义参数</strong>,配置如下图所示:</p>
 <p><img src="/img/new_ui/dev/parameter/local_parameter01.png" 
alt="local-parameter01"></p>
 <p>参数说明:</p>
@@ -30,6 +41,28 @@
 <blockquote>
 <p>注:本地参数可以在当前任务节点的工作流中,设置其为 OUT 则可以传递给下游的工作流使用,可以参考:<a 
href="context.md">参数传递</a></p>
 </blockquote>
+<h3>通过 <code>setValue</code> export 本地参数</h3>
+<p>如果你想简单 export 参数然后在下游任务中使用它们,你可以在你的任务中使用 
<code>setValue</code>,你可以将参数统一在一个任务中管理。在 Shell 任务中使用语法
+<code>echo '${setValue(set_val=123)}'</code>(<strong>不要忘记单引号</strong>) 并添加新的 
<code>OUT</code> 自定义参数来 export 它。</p>
+<p><img src="/img/new_ui/dev/parameter/local_param_set_val.png" 
alt="local-parameter-set-val"></p>
+<p>你可以在下游任务中使用语法 <code>echo '${set_val}'</code> 在获取设定的值。</p>
+<h3>通过 <code>setValue</code> 和自定义参数 export 本地参数</h3>
+<p>如果你想用自定义参数而不是常量值来实现参数 export,并下游任务中使用它们,你可以在通过 <code>setValue</code> 和 
自定义参数实现,当你想改变参数的值时可以直接改变
+“自定义参数”模块中的值,这让程序更加容易维护。您可以在 Shell 任务中使用语法 <code>echo 
&quot;#{setValue(set_val_param=${val})}&quot;</code>(<strong>如果你想要将任何
+变量赋值给 <code>setValue</code></strong> 请不要忘记使用双引号)并添加新的 <code>IN</code> 
自定义参数用于输入变量 <code>val</code> 和 <code>OUT</code> 自定义参数用于 export 参数 
<code>set_val_param</code>。</p>
+<p><img src="/img/new_ui/dev/parameter/local_param_set_val_custom.png" 
alt="local-parameter-set-val-param"></p>
+<p>你可以在下游任务中使用语法 <code>echo '${set_val_param}'</code> 在获取设定的值。</p>
+<h3>通过 <code>setValue</code> 和 Bash 环境变量参数 export 本地参数</h3>
+<p>If you want to export parameters with bash variable instead of constants 
value, and then use them in downstream tasks, you could use 
<code>setValue</code> in your task, which more flexible such as you can get 
variable for exists local or HTTP resource. You can use syntax like</p>
+<p>如果你想用 bash 变量而不是常量值 export 参数,并在下游任务中使用它们,你可以在通过 <code>setValue</code> 和 
Bash 变量实现,它更灵活,例如你动态获取现有的本地
+或 HTTP 资源获取设定变量。 您可以使用类似的语法</p>
+<pre><code class="language-shell">lines_num=$(wget 
https://raw.githubusercontent.com/apache/dolphinscheduler/dev/README.md -q -O - 
| wc -l | xargs)
+echo &quot;#{setValue(set_val_var=${lines_num})}&quot;
+</code></pre>
+<p>在 Shell 任务中(<strong>如果你想要将任何变量赋值给 <code>setValue</code></strong> 
请不要忘记使用双引号)和 <code>OUT</code> 自定义参数用于 export 参数 <code>set_val_var</code>。
+.</p>
+<p><img src="/img/new_ui/dev/parameter/local_param_set_val_bash.png" 
alt="local-parameter-set-val-bash"></p>
+<p>你可以在下游任务中使用语法 <code>echo '${set_val_var}'</code> 在获取设定的值。</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/parameter/local.json 
b/zh-cn/docs/dev/user_doc/guide/parameter/local.json
index c2f781a86..9a9b500a1 100644
--- a/zh-cn/docs/dev/user_doc/guide/parameter/local.json
+++ b/zh-cn/docs/dev/user_doc/guide/parameter/local.json
@@ -1,6 +1,6 @@
 {
   "filename": "local.md",
-  "__html": "<h1>本地参数</h1>\n<h2>作用域</h2>\n<p>在任务定义页面配置的参数,默认作用域仅限该任务,如果配置了<a 
href=\"context.md\">参数传递</a>则可将该参数作用到下游任务中。</p>\n<h2>使用方式</h2>\n<p>本地参数配置方式如下:在任务定义页面,点击“自定义参数”右边的加号,填写对应的变量名称和对应的值,保存即可。</p>\n<h2>任务样例</h2>\n<p>本样例展示了如何使用本地参数,打印输出当前日期。创建一个
 Shell 任务,并编写脚本内容为 <code>echo 
${dt}</code>。点击配置栏中的<strong>自定义参数</strong>,配置如下图所示:</p>\n<p><img 
src=\"/img/new_ui/dev/parameter/local_parameter01.png\" 
alt=\"local-parameter01\"></p>\n<p>参数说明:</p>\n<ul>\n<li>dt:参数名</li>\n<li>IN:IN 
表示局部参数仅能在当前节 [...]
+  "__html": "<h1>本地参数</h1>\n<h2>作用域</h2>\n<p>在任务定义页面配置的参数,默认作用域仅限该任务,如果配置了<a 
href=\"context.md\">参数传递</a>则可将该参数作用到下游任务中。</p>\n<h2>使用方式</h2>\n<p>本地参数配置方式如下:在任务定义页面,点击“自定义参数”右边的加号,填写对应的变量名称和对应的值,保存即可。</p>\n<ul>\n<li>如果要在单个任务中使用参数,请参阅通过自定义参数使用</li>\n<li>如果要在任务中使用配置参数并在下游任务中使用它们:\n<ul>\n<li>如果你只是想要简单使用,且不使用自定义参数,
 请参阅 通过 <code>setValue</code> 和自定义参数 export 本地参数</li>\n<li>如果想要使用自定义参数, 请参阅 通过 
<code>setValue</code> 和自定义参数 export 本地参数</li>\n<li>如果想要使用 Bash 参数, 请参阅 通过 
<code>setValue</code> 和 Bash  [...]
   "link": "/dist/zh-cn/docs/dev/user_doc/guide/parameter/local.html",
   "meta": {}
 }
\ No newline at end of file

Reply via email to