Parameter Configuration and Use

  • Last update: October 30, 2024
  • Overview

    This document introduces how to configure and use parameters in a scheduled task.

    Step One: Defining Parameters (Mandatory)

    The parameters on FineDataLink are divided into three types: in-task parameter, global parameter, and built-in parameter, as shown in the following figure.

    iconNote:

    The parameters available for the task are displayed on the Parameter List page.


    In-Task Parameter

    Task Parameter (Custom Parameter)

    iconNote:

    For details, see Custom Parameter (Static Parameter). The configured parameters can be referenced by all nodes in the current task. It is suitable for scenarios with few parameter values that are clearly defined and do not require calculation.

    Parameter generation location:

    Parameter generation description:

    1. Custom time parameter

    The custom time parameter needs to be based on the built-in parameter ${cyctime}. Custom time is achieved by adding to or subtracting from ${cyctime}. The format is ${Time format + N} or ${Time format - N}.

    Time format can be freely combined into various formats, such as yyyy, mm, dd, yyyymm, mmdd, yyyymmdd, yyyy-mm-dd, and yyyy-mm-dd hh:mi:ss, by yyyy, yy, mm, dd, hh, mi, and ss.

    iconNote:

    The following parameter formats are not supported: mi:ss, mi, and ss.

    2. Custom constant parameter

    The following constant parameter types are supported: Text, Value, and Boolean. The following figure shows an example.


    Assignment Parameter

    For details, see Parameter Assignment and Parameter Output.

    iconNote:

    Function scope of the parameter: It can be used by all nodes of downstream branches. It is applicable to scenarios where many parameter values exist, the parameter values are stored in database tables, interfaces, and files, and the parameter values need to be fetched and calculated (optional).

    After complex data processing on FineDataLink, the Parameter Assignment node and the Parameter Output operator can be used to output the processed results as parameters, as shown in the following figure.

    The following table shows the differences between the Parameter Assignment node and the Parameter Output operator.

    Distinguishing Item

    Parameter Assignment

    Parameter Output

    Position

    It is on the same level as the Data Transformation node.

    It is used within the Data Transformation node.

    Usage Method

    It can be used to generate parameter values and output parameters. It is suitable for scenarios where parameter values do not require complex calculations.

    It can only output the results generated by other operators as parameters, but cannot generate parameter values.

    If the parameter value requires complex calculations, use the Parameter Output operator.

    Global Parameter

    iconNote:
    Function scope of the parameter: It can be used by all scheduled tasks in the current project. It is suitable for scenarios where parameter values do not require complex calculations.

    1. Global Parameter - Static Parameter

    Supported types: Date, Text, Value, Boolean. The settings are the same as those mentioned in section "Task Parameter (Custom Parameter)."


    2. Global Parameter - Assignment Parameter

    You can configure dynamic global parameters, as shown in the following figure.

    Built-in Parameter

    The built-in parameters on FineDataLink can be used without defining them, as shown in the following figure.

    Step Two: Configuring Default Parameter Values (Recommended)

    Description

    You are advised to configure default and valid (can be previewed) parameter values for the parameters in the Parameter Assignment node, the Parameter Output operator, and Global Parameter - Static Parametermentioned in chapter "Step One: Defining Parameters (Mandatory)," as shown in the following figure.

    iconNote:

    1. The default parameter values serve only to facilitate data preview in downstream nodes and do not participate in the actual execution.

    2. If the closure character is enabled, the parameter value will be enclosed by single quotes (''). If the subsequent node references the parameter, pay attention to the use of single quotes ('')/double quotes (""). Adding an additional layer of single quotes ('') or double quotes ("") may result in data retrieval failure. For example, the value of parameter a is 'Beijing', referencing this parameter with an additional single quote ('${a}') will change the parameter value to ''Beijing'', as shown in the following figure.

    Configuring default parameter values facilitates the use of parameters in subsequent nodes, allows for viewing the effects of parameter references, and helps you confirm whether the task settings are correct.

    Notes

    Using the Latest Parameter Values

    If the parameter values are dynamic and subject to changes, you are advised to update the default parameter values before previewing the results, ensuring that the latest data can be previewed. For example, if the parameter value is access_token (which changes dynamically and may expire after a certain period), the default parameter value needs to be updated during task debugging. Otherwise, downstream nodes may fail to be previewed, as shown in the following figure.

    Configuring Multiple Default Parameter Values for Parameters Referenced by Loop Container Nodes

    You can enter multiple default parameter values, as shown in the following figure.


    If the parameter is referenced in the Loop Container node, the default parameter values will be filled in as they are during the preview stage (If the default values consist of five entries, the parameter values referenced by subsequent nodes will also be these five entries). The default values of the parameter will not be split.

    During the actual running of the task, parameters will be passed one by one to the Loop Container node. This process does not affect the actual running of the task. It only influences the preview results.

    Therefore, you are advised to fill in valid default parameter values so that the results can be previewed normally after subsequent nodes reference these parameters.

    Using Parameters (Mandatory)

    Using Parameters in Nodes

    Once parameters are defined, they can be used to query data within nodes and operators.

    For defined parameters, the following are some differences in the referencing method.

    1. The Parameter Assignment node, the Parameter Output operator, and Global Parameter - Dynamic Parameter

    If the defined closure characters for these parameters are correct, they can be referenced directly using ${Parameter name}. For details about the definition of closure character, see Parameter Assignment.

    iconNote:

    You can configure closure characters for these parameters.

    If Closure Character is enabled, the output parameter values will be automatically enclosed in quotes (''):

    • Numeric Separator: an example of a single value: 1 and an example of multiple values: 1,2,3

    • Text Separator: an example of a single value: 'text' and an example of multiple values: 'text 1', 'text 2'

    If the output data consists of multiple non-numeric values, Closure Character needs to be enabled. When this parameter is referenced in downstream nodes/operators, you do not need to add quotes (''). Use ${Parameter name} directly.

    If the output data consists of multiple non-numeric values, and Closure Character is not enabled, you need to add quotes ('') in the form of '${Parameter name}' when this parameter is referenced in downstream nodes/operators.

    2. Task Parameter (Custom Parameter), Built-in Parameter, and Global Parameter - Static Parameter

    • If the parameter is of integer, double, or Boolean type, reference the parameter directly using ${Parameter name}.

    • If the parameter value is of character or date type, it must be enclosed in single quotes ('') in the form of '${Parameter name}'.

    3. Special Cases

    In versions before V4.1.0, if parameters are referenced in the Loop Container node, the single quotes ('') of the parameters will be automatically removed. Therefore, single quotes ('') need to be manually added when using text type (with text-type separator) parameters in the Loop Container node.

    In V4.1.0 and later versions, if parameters are referenced in the Loop Container node, the single quotes ('') of the parameters will no longer be automatically removed. Therefore, single quotes ('') do not need to be manually added when using text type (enabling Closure Character) parameters in the Loop Container node.

    In the scenario where both the Parameter Assignment node and the Loop Container node are used, if Text Separator is selected as the separator of the parameters output by the Parameter Assignment node, the single quotes ('') added when using the parameter in the Loop Container node need to be removed manually when you upgrade FineDataLink to V4.1.0 and later versions.

    Parameter Reference Priority

    If the parameter name set in the Parameter Assignment node is identical to those in custom parameters and built-in parameters, the reference order will follow the following priority.

    • Overall priority from high to low: Parameters set in the Parameter Assignment node, parent task parameters in the Invocation Task node, custom parameters, global parameters, and built-in parameters

    Local priority: Since multiple Parameter Assignment nodes can be created in a task, two or more parameters with the same name that can be referenced by downstream nodes may exist. In this case, the parameter closer to the Parameter Assignment node has a higher priority.

    iconNote:

    For details, see Parameter Rules in Containers.

    Passing Parameters Across Levels

    Task parameters and dynamic parameters can be selectively passed to subtasks for use.

    For details, see Invocation Task.

    Viewing Parameters

    Global Parameter

    You can view all created global parameters on the configuration page, as shown in the following figure.


    In-Task Parameter

    Click Parameter List of a scheduled task to view the custom parameter (static parameter), and the parameters configured in the Parameter Assignment node and the Parameter Output operator in this task.

    Knowledge Expansion

    1. In some cases, you may need parameters of time type, and custom time parameters cannot meet actual needs. For example, you need to obtain the first day of the month and the last day of the month, and output them as parameters. Methods for obtaining such complex time parameters can be referenced as follows:

    iconNote:

    You can use other operators and nodes to process data, obtain the desired parameter values, and output the parameters.

    • Parameter acquisition through the Parameter Assignment node: Use SQL statements in the Parameter Assignment node to fetch parameter values and then output them.

    • Use Spark SQL to obtain parameter values, and output the parameters with the Parameter Output operator. For details, see Using Spark SQL to Construct Date Columns and Loop Data Retrieval, and Obtaining the Last Day of the Previous Month or the Last Day of the Previous Year as Parameters.

    2. Parameters support data acquisition after encryption. For details, see Overview of API Data Retrieval.

    附件列表


    主题: 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