[doc] Refactor local parameter docment (#10119)

(cherry picked from commit 5998c73aac)
This commit is contained in:
QuakeWang 2022-05-24 17:16:08 +08:00 committed by Jiajie Zhong
parent 00e1162286
commit b320743980
7 changed files with 34 additions and 16 deletions

View File

@ -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}`.
![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)

View File

@ -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参数名
- ININ 表示局部参数仅能在当前节点使用OUT 表示局部参数可以向下游传递
- DATE数据类型日期
- $[yyyy-MM-dd]:自定义格式的衍生内置参数
保存工作流并运行,查看 Shell 任务输出日志。
![local-parameter02](/img/new_ui/dev/parameter/local_parameter02.png)
> 注:本地参数可以在当前任务节点的工作流中,设置其为 OUT 则可以传递给下游的工作流使用,可以参考:[参数传递](context.md)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 KiB