Built-in Parameter

  • Last update: November 07, 2024
  • Overview

    Version Description

    FineDataLink VersionFunctional Change

    1.7

    Added the built-in parameters: ${cyctime}, ${workname.opresult}, and ${jobname.opresult}

    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.

    Application Scenario

    FineDataLink provides built-in parameters that do not need to be defined and can be called directly.

    Function Description

    The following figure shows the currently available built-in parameters.

    2024-10-08_09-23-31.png

    Built-in ParameterScope of EffectUsageDefinitionParameter Type

    ${cyctime}

    In the Current Task

    Use Directly

    The parameter refers to the time for each running of the ETL task set in Task Control, in yyyy-mm-dd hh:mm:ss format.

    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}

    In the Current Task

    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.

    String

    ${prepose.successInfo}

    In the Current Task

    Use Directly

    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]]

    String

    ${prepose.failedInfo}

    In the Current Task

    Use Directly

    The parameter refers to the name (array string) of all upstream nodes that fail to be executed in the step flow.

    For example, [[SQL Script], [Data Transformation]]

    String

    ${loopTimes}

    In the Loop Container

    Use Directly

    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:

    • success: The node run successfully.

    • fail: The node failed to run.

    • skipped: The node skipped execution.

    String

    ${workname}

    In the Current Task

    Use Directly

    The parameter refers to the current task name.

    String

    ${cyctime}——Task Running Time

    Parameter Value Logic Description

    • 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

    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)

    2024-10-08_09-40-34.png

    Click Data Preview, the retrieved data is from the 31 days before the current system time.


    iconNote:
    When you click Data Preview, the default value of cyctime is the current system time. However, when the task is running, the value of cyctime is the execution time of the scheduled task. Therefore, the data in the data preview may be inconsistent with the data written into the database during actual execution.


    3. You can set Data Destination and Execution Frequency in the following steps according to the actual situation. 

    ${workname.opresult}——Conditional Branch Node Judgement

    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. 


    iconNote:
    In V4.0.30 and later versions, this scenario can be implemented through Event Schedule.


    1. Task CC contains a Data Synchronization node, which implements cross-database synchronization, as shown in the following figure. 

    2024-10-08_09-46-04.png

    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.

    2024-10-08_10-04-39.png


    iconNote:
    In V4.1.0 and later versions, you need to select the task when using this parameter in the Conditional Branch node, as shown in the following figure. 


    Screen Recording 2024-10-14 at 15.11.22 (1).gif

    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.

    ${jobname.opresult} — Running Result of the Specified Node in the Current Task


    iconNote:

    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.

    2024-10-08_10-20-52.png

    2. After the Data Synchronization node is executed successfully, you will receive a success message.

    ${prepose.successInfo} — Name of the Successfully Executed Nodes in the Upstream

    1. Modify the message content of the Notification node to ${prepose.successInfo}, as shown in the following figure.

    2024-10-18_14-56-48.png

    2. After the task is executed, you will receive a message with all names of the successfully executed upstream nodes of the Notification node.

    ${prepose.failedInfo} — Name of the Nodes that Fail to be Executed in the Upstream

    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. 

    2024-10-18_14-58-16.png

    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.

    ${loopTimes} — Current Loop Times in the Loop Container

    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.

    2024-10-18_15-01-07.png

    2. After the task is executed, you will receive the current loop times.

    ${workname} — Name of the Current Task

    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.

    2024-10-18_15-07-27.png

    3. After the task is successfully executed, you will receive the execution result of the task.

    ${workname.jobname.opresult} — Running Result of the Node in the Specified Task (Non-Current 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}.


    iconNote:
    If you want to obtain the node in the current task, you are advised to use ${jobname.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.

    2024-10-18_15-15-49.png

    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.

    Screen Recording 2024-10-18 at 15.20.36 (1).gif


    附件列表


    主题: Data Development - Scheduled Task
    Previous
    Next
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy