Browse Source

[doc] Refactor local parameter docment (#10119)

(cherry picked from commit 5998c73aac)
3.0.0/version-upgrade
QuakeWang 3 years ago committed by Jiajie Zhong
parent
commit
b320743980
  1. 25
      docs/docs/en/guide/parameter/local.md
  2. 25
      docs/docs/zh/guide/parameter/local.md
  3. BIN
      docs/img/global_parameter_en.png
  4. BIN
      docs/img/new_ui/dev/parameter/local_parameter01.png
  5. BIN
      docs/img/new_ui/dev/parameter/local_parameter02.png
  6. BIN
      docs/img/supplement_local_parameter.png
  7. BIN
      docs/img/supplement_local_parameter_en.png

25
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
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"> ## Examples
<img src="/img/supplement_local_parameter_en.png" width="80%" />
</p>
<p align="center"> 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:
<img src="/img/global_parameter_en.png" width="80%" />
</p>
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)

25
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"> 本样例展示了如何使用本地参数,打印输出当前日期。创建一个 Shell 任务,并编写脚本内容为 `echo ${dt}`。点击配置栏中的**自定义参数**,配置如下图所示:
<img src="/img/global_parameter.png" width="80%" />
</p>
如果想要在本地参数中调用系统内置参数,将内置参数对应的值填到`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)

BIN
docs/img/global_parameter_en.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 KiB

BIN
docs/img/new_ui/dev/parameter/local_parameter01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 KiB

BIN
docs/img/new_ui/dev/parameter/local_parameter02.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 KiB

BIN
docs/img/supplement_local_parameter.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

BIN
docs/img/supplement_local_parameter_en.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 240 KiB

Loading…
Cancel
Save