1.7
4.0.3
1. Added the built-in parameters: ${prepose.successInfo} and ${prepose.failedInfo}.
2. The value fail was changed into error in the three values output by the built-in parameter ${workname. opresult}.
3. The value skipped was added into the values output by the built-in parameter ${jobname.opresult}.
4.0.3.1
Added the built-in parameter: ${loopTimes}.
4.1.0
Added the built-in parameters: ${workname.jobname.opresult} and ${workname}.
4.1.2
Optimized the value logic of the built-in parameter ${cyctime}.
4.1.8.3
The built-in parameter types have been changed from the default Text to Date, INT, and String. For details, see the "Function Description" section in this document.
FineDataLink provides built-in parameters that do not need to be defined and can be called directly.
The following figure shows the currently available built-in parameters.
${cyctime}
In the Current Task
Use Directly
For example, 2021-09-09 20:45:50 (accurate to the second).
The time here represents the time when the task enters the running queue, not the actual execution time, which occurs slightly later.
When you need to perform some operations with the task running time, you can use the built-in parameter ${cyctime}.
For example, if a task runs every 30 days, you only need to update the data of 30 days before the running time point (${cyctime}).
Date
${workname.opresult}
In All Tasks
Require Task Selection
The parameter refers to the latest running result of the specified task. For example, ${Task 1.opresult} can output three values:
success: The task run successfully.
error: Errors occurred in the task running process. (In versions before V4.0.3, this value is fail.)
invalid: The task was aborted. (Task exception, which is usually caused by the shutdown of FineDataLink during task execution, and the task status will be set to invalid after restart.)
This parameter is usually used to set the judgement condition for the conditional branch nodes.
String
${jobname.opresult}
Require Node Selection
The parameter refers to the latest running result of the specified node in the current task. For example, ${Data Synchronization.opresult} can output three values:
success: The node run successfully.
fail: The node failed to run.
skipped (added in V4.0.3): The node skipped execution.
${prepose.successInfo}
The parameter refers to the name (array string) of all successfully executed upstream nodes of this node in the step flow.
For example, [[SQL Script], [Data Transformation]]
${prepose.failedInfo}
The parameter refers to the name (array string) of all upstream nodes that fail to be executed in the step flow.
${loopTimes}
In the Loop Container
The parameter refers to the current loop times in the loop container, whose value is 1 for the first time and increases by 1 with each loop.
INT
${workname.jobname.opresult}
The parameter refers to the nodes with management authority for tasks (except for the current task, which requires the parameter ${jobname.opresult}.)
Require Node + Task Selection
The parameter refers to the latest running result of the specified node in the specified task (non-current task). For example, ${Task 1.Data Synchronization.opresult} can output three values:
skipped: The node skipped execution.
${workname}
The parameter refers to the current task name.
If the instance is triggered and generated by Task Schedule, the value of ${cyctime} is the time when each scheduled task starts.
If the instance is triggered and generated by the user manually or by Event Schedule, or the service date is not specified during retry, the value of ${cyctime} is the start time of instance generation.
If the instance is triggered and generated by the user's retry operation with the service date specified, the value of ${cyctime} is the time specified by the user.
The format of ${cyctime} is yyyy-mm-dd hh:mm:ss, and the actual output value format is 2021-09-09 20:45:50 (accurate to the second).
Example: The instance is triggered and generated by Task Schedule.
With the built-in parameter ${cyctime}, you can synchronize only the data of 31 days before the running time point each time the task runs.
1. Create a scheduled task and drag the Data Synchronization node onto the page.
2. Set the data source for the node as shown in the following figure. The SQL statement is used to retrieve the data of the previous 31 days from the Stock-out Temporary Table.
The SQL statement is as follows:
SELECT * FROM `demo1`.`Stock-out Temporary Table` where Stock-out Date>DATE_SUB('${cyctime}',interval 31 day)
Click Data Preview, the retrieved data is from the 31 days before the current system time.
3. You can set Data Destination and Execution Frequency in the following steps according to the actual situation.
The built-in parameter ${workname.opresult} is usually used to set the judgement condition for the conditional branch nodes.
Example: Task CC is executed after the scheduled task Data Duplication and Splitting is executed successfully.
1. Task CC contains a Data Synchronization node, which implements cross-database synchronization, as shown in the following figure.
2. To make Task CC to be executed after the scheduled task Data Duplication and Splitting is successfully executed, you can use the built-in parameter ${workname.opresult}.
Drag the Conditional Branch node in front of the Data Synchronization node, and set the judgment condition in the Conditional Branch node as: ${Data Duplication and Splitting.opresult} is success.
In versions earlier than V4.1.0, when using this parameter in the Conditional Branch node, you can directly input Data Duplication and Splitting.opresult in the parameter column and press the Enter Key, and input success in the text box on the right.
The parameter format is ${Upstream Node Name.opresult}.
1. Modify the message content of the Notification node to ${Data Synchronization.opresult}, as shown in the following figure.
2. After the Data Synchronization node is executed successfully, you will receive a success message.
1. Modify the message content of the Notification node to ${prepose.successInfo}, as shown in the following figure.
2. After the task is executed, you will receive a message with all names of the successfully executed upstream nodes of the Notification node.
1. Modify the message content of the Notification node to ${prepose.failedInfo} by referring to the "${prepose.successInfo} — Names of the Successfully Executed Nodes in the Upstream" section in this document.
2. After the task is executed, you will receive a message with all names of the upstream nodes of the Notification node that fail to be executed.
This parameter takes effect within the loop container, which refers to the current loop times in the loop container, whose value is 1 for the first time and increases by 1 for each subsequent loop.
1. Drag the Notification node into the Loop Container node. The following figure shows the setting page.
2. After the task is executed, you will receive the current loop times.
The value of this parameter is the name of the current task.
Example: Use this parameter in the Notification node to notify users that the task is successfully executed.
1. The Built-in Parameter Test Task contains a Data Synchronization node and a Notification node.
2. The following figure shows the setting page of the Notification node.
3. After the task is successfully executed, you will receive the execution result of the task.
The parameter refers to the latest running result of the specified node in the specified task (non-current task). For example, ${Task 1.Data Synchronization.opresult}.
Example: The Data Synchronization node in the 01 Data Synchronization task is executed successfully before the Data Synchronization node in Task 2 is executed.
1. Task 2 contains a Data Synchronization node, which implements cross-database synchronization, as shown in the following figure.
2. To make the Data Synchronization node in the 01 Data Synchronization task to be executed successfully before the Data Synchronization node in Task 2 is executed, you need to drag the Conditional Branch node in front of the Data Synchronization node, and set the judgment condition in the Conditional Branch node as shown in the following figure.
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
Submitted successfully
Network busy