You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by zh...@apache.org on 2022/05/24 15:12:14 UTC

[dolphinscheduler] 14/16: [doc] Refactor local parameter docment (#10119)

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

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

commit b32074398099d0b6f943413b98c43aaff775ce9c
Author: QuakeWang <45...@users.noreply.github.com>
AuthorDate: Tue May 24 17:16:08 2022 +0800

    [doc] Refactor local parameter docment (#10119)
    
    (cherry picked from commit 5998c73aac2f2532fca90fb8fe8ba431c322ffe3)
---
 docs/docs/en/guide/parameter/local.md              |  25 ++++++++++++++-------
 docs/docs/zh/guide/parameter/local.md              |  25 ++++++++++++++-------
 docs/img/global_parameter_en.png                   | Bin 219165 -> 0 bytes
 .../img/new_ui/dev/parameter/local_parameter01.png | Bin 0 -> 642098 bytes
 .../img/new_ui/dev/parameter/local_parameter02.png | Bin 0 -> 303057 bytes
 docs/img/supplement_local_parameter.png            | Bin 228552 -> 0 bytes
 docs/img/supplement_local_parameter_en.png         | Bin 246045 -> 0 bytes
 7 files changed, 34 insertions(+), 16 deletions(-)

diff --git a/docs/docs/en/guide/parameter/local.md b/docs/docs/en/guide/parameter/local.md
index a764e7b5fc..3ba290bb36 100644
--- a/docs/docs/en/guide/parameter/local.md
+++ b/docs/docs/en/guide/parameter/local.md
@@ -6,14 +6,23 @@ Parameters configured on the task definition page, the scope of this parameter i
 
 ## Usage
 
-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:
+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 align="center">
-     <img src="/img/supplement_local_parameter_en.png" width="80%" />
-</p>
+## Examples
 
-<p align="center">
-     <img src="/img/global_parameter_en.png" width="80%" />
-</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 `echo ${dt}`. Click **custom parameter** in the configuration bar, and the configuration is as follows:
 
-If you want to call the [built-in parameter](built-in.md) in the local parameters, fill in thevalue of built-in parameters in `value`. As in the above figure, `${biz_date}` and `${curdate}`.
\ No newline at end of file
+![local-parameter01](/img/new_ui/dev/parameter/local_parameter01.png)
+
+Parameters:
+
+- dt: indicates the parameter name
+- in: IN indicates that local parameters can only be used on the current node, and OUT indicates that local parameters can be transmitted to the downstream
+- DATE: indicates the DATE of the data type
+- $[YYYY-MM-DD] : indicates a built-in parameter derived from a user-defined format
+
+Save the workflow and run it. View Shell task's log.
+
+![local-parameter02](/img/new_ui/dev/parameter/local_parameter02.png)
+
+> 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: [Parameter Context](context.md)
diff --git a/docs/docs/zh/guide/parameter/local.md b/docs/docs/zh/guide/parameter/local.md
index b5598c81b8..b92c593ecf 100644
--- a/docs/docs/zh/guide/parameter/local.md
+++ b/docs/docs/zh/guide/parameter/local.md
@@ -6,14 +6,23 @@
 
 ## 使用方式
 
-本地参数配置方式如下:在任务定义页面,点击“自定义参数”右边的加号,填写对应的变量名称和对应的值,保存即可
+本地参数配置方式如下:在任务定义页面,点击“自定义参数”右边的加号,填写对应的变量名称和对应的值,保存即可。
 
-<p align="center">
-   <img src="/img/supplement_local_parameter.png" width="80%" />
- </p>
+## 任务样例
 
-<p align="center">
-   <img src="/img/global_parameter.png" width="80%" />
-</p>
+本样例展示了如何使用本地参数,打印输出当前日期。创建一个 Shell 任务,并编写脚本内容为 `echo ${dt}`。点击配置栏中的**自定义参数**,配置如下图所示:
 
-如果想要在本地参数中调用系统内置参数,将内置参数对应的值填到`value`中,如上图中的`${biz_date}`以及`${curdate}`
+![local-parameter01](/img/new_ui/dev/parameter/local_parameter01.png)
+
+参数说明:
+
+- dt:参数名
+- IN:IN 表示局部参数仅能在当前节点使用,OUT 表示局部参数可以向下游传递
+- DATE:数据类型,日期
+- $[yyyy-MM-dd]:自定义格式的衍生内置参数
+
+保存工作流并运行,查看 Shell 任务输出日志。
+
+![local-parameter02](/img/new_ui/dev/parameter/local_parameter02.png)
+
+> 注:本地参数可以在当前任务节点的工作流中,设置其为 OUT 则可以传递给下游的工作流使用,可以参考:[参数传递](context.md)
diff --git a/docs/img/global_parameter_en.png b/docs/img/global_parameter_en.png
deleted file mode 100644
index 32aecf3715..0000000000
Binary files a/docs/img/global_parameter_en.png and /dev/null differ
diff --git a/docs/img/new_ui/dev/parameter/local_parameter01.png b/docs/img/new_ui/dev/parameter/local_parameter01.png
new file mode 100644
index 0000000000..09d38366e8
Binary files /dev/null and b/docs/img/new_ui/dev/parameter/local_parameter01.png differ
diff --git a/docs/img/new_ui/dev/parameter/local_parameter02.png b/docs/img/new_ui/dev/parameter/local_parameter02.png
new file mode 100644
index 0000000000..02572a7036
Binary files /dev/null and b/docs/img/new_ui/dev/parameter/local_parameter02.png differ
diff --git a/docs/img/supplement_local_parameter.png b/docs/img/supplement_local_parameter.png
deleted file mode 100644
index 04588ea99e..0000000000
Binary files a/docs/img/supplement_local_parameter.png and /dev/null differ
diff --git a/docs/img/supplement_local_parameter_en.png b/docs/img/supplement_local_parameter_en.png
deleted file mode 100644
index 1209269fb6..0000000000
Binary files a/docs/img/supplement_local_parameter_en.png and /dev/null differ