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

lidongdai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler-website.git


The following commit(s) were added to refs/heads/master by this push:
     new d1b1f5a  [Summer 2021] create new documents about parameters 
introduction(zh+en) (#432)
d1b1f5a is described below

commit d1b1f5a437ee4d9dd9f6251ca728dd0f4bf2ef68
Author: xuweiyi0923 <[email protected]>
AuthorDate: Sat Oct 2 22:04:59 2021 +0800

    [Summer 2021] create new documents about parameters introduction(zh+en) 
(#432)
    
    * pics used in introduction of parameters
    
    * Dolphinscheduler 参数使用说明
    
    * Rename Dolphinscheduler 参数使用说明.md to Parameters introduction.md
    
    * Rename Parameters introduction.md to parameters-introduction.md
    
    * Dolphinscheduler parameter introduction(en)
    
    * Rename Dolphinscheduler parameter introduction.md to 
parameters-introduction.md
    
    * Update docs1-3-8.js
---
 .../1.3.8/user_doc/parameters-introduction.md      |  80 +++++++++++++++++++
 .../1.3.8/user_doc/parameters-introduction.md      |  86 +++++++++++++++++++++
 img/supplement_global_parameter.png                | Bin 0 -> 295951 bytes
 img/supplement_global_parameter_en.png             | Bin 0 -> 124936 bytes
 img/supplement_local_parameter.png                 | Bin 0 -> 228552 bytes
 img/supplement_local_parameter_en.png              | Bin 0 -> 246045 bytes
 site_config/docs1-3-8.js                           |   8 ++
 7 files changed, 174 insertions(+)

diff --git a/docs/en-us/1.3.8/user_doc/parameters-introduction.md 
b/docs/en-us/1.3.8/user_doc/parameters-introduction.md
new file mode 100644
index 0000000..9abdb54
--- /dev/null
+++ b/docs/en-us/1.3.8/user_doc/parameters-introduction.md
@@ -0,0 +1,80 @@
+# Dolphinscheduler parameter introduction
+
+#### 1. System parameters
+
+<table>
+    <tr><th>variable</th><th>declaration method</th><th>meaning</th></tr>
+    <tr>
+        <td>system.biz.date</td>
+        <td>${system.biz.date}</td>
+        <td>The day before the scheduled time of the daily scheduling 
instance, the format is yyyyMMdd, when the data is supplemented, the date is 
+1</td>
+    </tr>
+    <tr>
+        <td>system.biz.curdate</td>
+        <td>${system.biz.curdate}</td>
+        <td>The timing time of the daily scheduling instance, the format is 
yyyyMMdd, when the data is supplemented, the date is +1</td>
+    </tr>
+    <tr>
+        <td>system.datetime</td>
+        <td>${system.datetime}</td>
+        <td>The timing time of the daily scheduling instance, the format is 
yyyyMMddHHmmss, when the data is supplemented, the date is +1</td>
+    </tr>
+</table>
+
+
+#### 2. Time custom parameters
+
+- Support custom variable names in the code, declaration method: \${variable 
name}. It can refer to "system parameters" or specify "constants".
+
+- We define this benchmark variable as \$[...] format, \$[yyyyMMddHHmmss] can 
be decomposed and combined arbitrarily, such as: \$[yyyyMMdd], \$[HHmmss], 
\$[yyyy-MM-dd], etc.
+
+- Or the 2 following methods may be useful:
+
+      1. use add_month(yyyyMMdd, offset) function to add/minus number of months
+      the first parameter of this function is yyyyMMdd, representing the time 
format user will get
+      the second is offset, representing the number of months the user wants 
to add or minus
+      * Next N years:$[add_months(yyyyMMdd,12*N)]
+      * N years before:$[add_months(yyyyMMdd,-12*N)]
+      * Next N months:$[add_months(yyyyMMdd,N)]
+      * N months before:$[add_months(yyyyMMdd,-N)]
+      
*********************************************************************************************************
+      2. add numbers directly after the time format
+      * Next N weeks:$[yyyyMMdd+7*N]
+      * First N weeks:$[yyyyMMdd-7*N]
+      * Next N days:$[yyyyMMdd+N]
+      * N days before:$[yyyyMMdd-N]
+      * Next N hours:$[HHmmss+N/24]
+      * First N hours:$[HHmmss-N/24]
+      * Next N minutes:$[HHmmss+N/24/60]
+      * First N minutes:$[HHmmss-N/24/60]
+
+#### 3. <span id=UserDefinedParameters>User-defined parameters</span>
+
+- User-defined parameters are divided into global parameters and local 
parameters. Global parameters are global parameters passed when saving workflow 
definitions and workflow instances. Global parameters can be referenced in the 
local parameters of any task node in the entire process.
+- the approach to set global parameters is, after defining the workflow, click 
the 'save' button, then click the '+' button below the 'Set global':
+
+<p align="center">
+   <img src="/img/supplement_global_parameter_en.png" width="80%" />
+ </p>
+
+​              The global_bizdate parameter defined here can be referenced by 
local parameters of any other task node, and the value of global_bizdate is set 
to the figure obtained by referencing the system parameter system.biz.date:  
+
+<p align="center">
+   <img src="/img/local_parameter_en.png" width="80%" />
+ </p>
+
+- the approach to set local parameters is, double-click on any node while 
defining the workflow and click the '+' button next to the 'Custom Parameters':
+
+<p align="center">
+     <img src="/img/supplement_local_parameter_en.png" width="80%" />
+   </p>
+
+<p align="center">
+     <img src="/img/global_parameter_en.png" width="80%" />
+   </p>
+
+​              In the task, local_param_bizdate uses \${global_bizdate} to 
refer to global parameters. For shell scripts, you can use 
\${local_param_bizdate} to refer to the value of global variable 
global_bizdate, or directly set the value of local_param_bizdate through JDBC.
+
+​              Similarly, local_param refers to the global parameters defined 
in the previous section through ${local_param}.  
+
+​              biz_date, biz_curdate, and system.datetime are user-defined 
parameters assigned by ${global parameter}.  
diff --git a/docs/zh-cn/1.3.8/user_doc/parameters-introduction.md 
b/docs/zh-cn/1.3.8/user_doc/parameters-introduction.md
new file mode 100644
index 0000000..e1fe261
--- /dev/null
+++ b/docs/zh-cn/1.3.8/user_doc/parameters-introduction.md
@@ -0,0 +1,86 @@
+# Dolphinscheduler 参数使用说明
+
+#### 1. 系统参数
+
+<table>
+    <tr><th>变量名</th><th>声明方式</th><th>含义</th></tr>
+    <tr>
+        <td>system.biz.date</td>
+        <td>${system.biz.date}</td>
+        <td>日常调度实例定时的定时时间前一天,格式为 yyyyMMdd,补数据时,该日期 +1</td>
+    </tr>
+    <tr>
+        <td>system.biz.curdate</td>
+        <td>${system.biz.curdate}</td>
+        <td>日常调度实例定时的定时时间,格式为 yyyyMMdd,补数据时,该日期 +1</td>
+    </tr>
+    <tr>
+        <td>system.datetime</td>
+        <td>${system.datetime}</td>
+        <td>日常调度实例定时的定时时间,格式为 yyyyMMddHHmmss,补数据时,该日期 +1</td>
+    </tr>
+</table>
+
+
+
+#### 2.自定义参数
+
+##### 2.1 时间自定义参数
+
+  - 支持代码中自定义变量名,声明方式:${变量名}。可以是引用 "系统参数" 或指定 "常量"。
+
+  - 我们定义这种基准变量为 \$[...] 格式的,\$[yyyyMMddHHmmss] 是可以任意分解组合的,比如:\$[yyyyMMdd], 
\$[HHmmss], \$[yyyy-MM-dd] 等
+
+  - 也可以通过以下两种方式:
+
+
+        1.使用add_months()函数,该函数用于加减月份,
+        第一个入口参数为[yyyyMMdd],表示返回时间的格式
+        第二个入口参数为月份偏移量,表示加减多少个月
+       * 后 N 年:$[add_months(yyyyMMdd,12*N)]
+        * 前 N 年:$[add_months(yyyyMMdd,-12*N)]
+        * 后 N 月:$[add_months(yyyyMMdd,N)]
+        * 前 N 月:$[add_months(yyyyMMdd,-N)]
+        *******************************************
+        2.直接加减数字
+        在自定义格式后直接“+/-”数字
+        * 后 N 周:$[yyyyMMdd+7*N]
+        * 前 N 周:$[yyyyMMdd-7*N]
+        * 后 N 天:$[yyyyMMdd+N]
+        * 前 N 天:$[yyyyMMdd-N]
+        * 后 N 小时:$[HHmmss+N/24]
+        * 前 N 小时:$[HHmmss-N/24]
+        * 后 N 分钟:$[HHmmss+N/24/60]
+        * 前 N 分钟:$[HHmmss-N/24/60]
+
+##### 2.2 <span id=UserDefinedParameters>用户自定义参数</span>
+
+  - 
用户自定义参数分为全局参数和局部参数。全局参数是保存工作流定义和工作流实例的时候传递的全局参数,全局参数可以在整个流程中的任何一个任务节点的局部参数引用。
+  - 设置全局参数的方法是,定义完成工作流后,点击页面右上角的”保存“按钮,在弹窗内点击“设置全局”下方的“+”按钮,如图:
+
+
+<p align="center">
+   <img src="/img/supplement_global_parameter.png" width="80%" />
+</p>
+​              
这里定义的global_bizdate参数可以被其它任一节点的局部参数引用,并设置global_bizdate的value为通过引用系统参数          
                                        system.biz.date获得的值:
+
+<p align="center">
+   <img src="/img/local_parameter.png" width="80%" />
+ </p>
+
+ - 设置局部参数的方法是,在定义工作流时,双击任一节点,点击弹窗中的自定义参数旁的‘+‘按钮:
+
+<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>
+
+​              
观察上图的最后一行,local_param_bizdate通过\${global_bizdate}来引用全局参数,在shell脚本中可以通过\${local_param_bizdate}来引全局变量
 global_bizdate的值,或通过JDBC直接将local_param_bizdate的值set进去。
+
+​              同理,local_param通过${local_param}引用上一节中定义的全局参数。
+
+​              biz_date、biz_curdate、system.datetime都是用户自定义的参数,通过${全局参数}进行赋值。
+
diff --git a/img/supplement_global_parameter.png 
b/img/supplement_global_parameter.png
new file mode 100644
index 0000000..2fd7d17
Binary files /dev/null and b/img/supplement_global_parameter.png differ
diff --git a/img/supplement_global_parameter_en.png 
b/img/supplement_global_parameter_en.png
new file mode 100644
index 0000000..f026f71
Binary files /dev/null and b/img/supplement_global_parameter_en.png differ
diff --git a/img/supplement_local_parameter.png 
b/img/supplement_local_parameter.png
new file mode 100644
index 0000000..04588ea
Binary files /dev/null and b/img/supplement_local_parameter.png differ
diff --git a/img/supplement_local_parameter_en.png 
b/img/supplement_local_parameter_en.png
new file mode 100644
index 0000000..1209269
Binary files /dev/null and b/img/supplement_local_parameter_en.png differ
diff --git a/site_config/docs1-3-8.js b/site_config/docs1-3-8.js
index 51bc5d6..4e652d9 100644
--- a/site_config/docs1-3-8.js
+++ b/site_config/docs1-3-8.js
@@ -49,6 +49,10 @@ export default {
             title: 'Flink',
             link: '/en-us/docs/1.3.8/user_doc/flink-call.html',
           },
+          {
+            title: 'Parameter Introduction',
+            link: '/en-us/docs/1.3.8/user_doc/parameters-introduction.html',
+          },
         ],
       },
       {
@@ -165,6 +169,10 @@ export default {
             title: 'Flink调用',
             link: '/zh-cn/docs/1.3.8/user_doc/flink-call.html',
           },
+          {
+            title: '参数介绍',
+            link: '/zh-cn/docs/1.3.8/user_doc/parameters-introduction.html',
+          },
         ],
       },
       {

Reply via email to