Parameter Assignment

  • Last update: September 24, 2024
  • Overview 

    Version 

    FineDataLink VersionFunctional Change
    1.7Added the Parameter Assignment node, which could be used to output the obtained data as parameters that can be used by the downstream node. Cross-node use was not allowed.
    4.1.6.1Optimized the prompt of batch row/column selection operations in the Parameter Assignment node. For details, see the sections "Batch Parameter Generation,""Batch Parameter Modification," and "Batch Parameter Deletion" of this article.
    4.1.7.3Similar to the Data Synchronization node, the Parameter Assignment node allowed specifying the response encoding in Advanced Configuration when API was selected as the data source.

    Application Scenario 

    • You want the results output by upstream nodes to be used by downstream nodes.

    • You want to implement conditional judgment based on the execution results of specific nodes.

    You can use the Parameter Assignment node to output the execution results of upstream nodes as parameters that can be used by downstream nodes.

    参数赋值_cdb6879ff8ce586c_fixed.jpeg

    Function Description 

    In a data development task, if a node requires the output results from multiple and multi-level upstream nodes, you can use the Parameter Assignment node, extract the necessary data in Data Source, and assign it to parameters to output the extracted data as parameters. Downstream nodes can then use these parameter values.

    Usage Description 

    1. The user-created parameters only belong to the current task.

    2. For details about the parameter application scenarios in FineDataLink, see Typical Parameter Application in FineDataLink.

    3. For details about how to use parameters, see Parameter Configuration and Use.

    4. For details about the difference between Parameter Assignment and Parameter Output, see In-Task Parameter.


    Function Description 

    Parameter Adding and Use 

    Create a Parameter Assignment node in a scheduled task to add parameters that can be used by the downstream node, as shown in the following figure.

    Data Source

    Fetch data to be assigned to the parameter in Data Source.

    You can fetch data from multiple data sources. For details, see Data Sources Supported by FineDataLink.

    1. When you select a data source from DB Table Input, you can fetch data by writing SQL statements, selecting the table (Adding filter conditions is supported.), and calling the stored procedure, as shown in the following figure.

    iconNote:

    On the Data Source tab page, when you set Configuration Method to Table Selection, the table description is displayed. For details about the table description, see Data Synchronization - Data Source.

    2. You may want to obtain the token from the API request header and set it as a parameter to facilitate subsequent API calling.

    To achieve that, select API Input from the drop-down list of Data Source of the Parameter Assignment node, where you can obtain the response header, response body, and status code of the API response, as shown in the following figures.

    AttributeTypeDescription
    Response Body ProcessingJSON

    Select Response Body under Return Value Processing > Information Type. You can specify a JSON path for the response body or expand the parsed JSON data into a two-dimensional table. For instance, if you select Response Body and Expand Parsed JSON Data into a Two-Dimensional Table, the data preview result is shown in the following figure.

    If any information type besides Response Body is selected, the Expand Parsed JSON Data into a Two-Dimensional Table option is unselectable.

    Response Header ProcessingKey

    Select Response Header under Return Value Processing > Information Type. You can parse the value of the key in the response header.

    You can configure keys in the currently obtained response header in batches, or manually add the key.

    iconNote:
    If you select Response Header and Response BodyExpand Parsed JSON Data into a Two-Dimensional Table and Generate Data Transformation are unavailable. 

    If you select Response HeaderResponse Body, and Status Code, the data preview result will be a dimension table with columns displayed in the order of the status code, the response header, and the response body, as shown in the following figure.

    iconNote:
    Previously, if Expand Parsed JSON Data into a Two-Dimensional Table is not selected, the downstream operator will receive a two-dimensional table containing one row and one column with a default field. The default field has now been changed to responseBody

    You can then set the parsed data as parameters in Output Parameter.

    Output Parameter

    You can fetch data from the specified column and row and set it as a parameter, as shown in the following figure.

    iconNote:
    The ${} symbol is not allowed in parameter names and values. 
    Configuration Item Description
    Parameter Name Repeated parameter names are not allowed in one Parameter Assignment node.
    Value Source

    You can fetch data from the specified column and row and set it as a parameter.

    iconNote:
    A single parameter in the Parameter Assignment node can be assigned with up to 10,000 field values. If the number of values exceeds the limit, the node will fail to be run.
    The fetched data table is shown in the following figure. 

    Set parameter values to values in all columns in the first row of the data table, as shown in the following figure.

    Closure Character

    For FineDataLink of versions before 4.1.0: 

    Numeric Separator:

    • An example of a single value: 1  

    • An example of multiple values: 1,2,3

    Text Separator:  

    • An example of a single value: 'text'  

    • An example of multiple values: ' text 1','text 2'

    iconNote:
    If the output data contains multiple non-numerical values, set the separator to Text Separator.

    For FineDataLink 4.1.0 and later versions:

    Closure Character is disabled by default for values of new parameters.

    If Closure Character is disabled, the separating effect is equivalent to that of the numeric separator in FineDataLink of versions before 4.1.0.

    If Closure Character is enabled, the separating effect is equivalent to that of the text separator in FineDataLink of versions before 4.1.0.

    Parameter Preview

    After setting the parameter value, click Parameter Preview to view the parameter value.

    iconNote:
    If the source table is empty, an error will be reported after you click Parameter Preview.

    Debug Value

    The debug value is to demonstrate the data preview effect for downstream nodes and is not used during the formal operation.

    For FineDataLink of versions before 4.1.0, You are strongly advised to fill in the default parameter value to demonstrate the data preview effect for downstream nodes. 

    For FineDataLink 4.1.0 and later versions, the first five parameter values in the preview area are set as debug values after you click Parameter Preview.

    In the parameter list of the current task, you can see all the parameters set in the Parameter Assignment node, as shown in the following figure.

    Parameter Use

    1. Cross-node parameter passing is supported.

    The output parameter can be used in all downstream nodes of the same branch, but cannot be used in nodes of other branches.

    The parameter values output by the Parameter Assignment node remain unchanged until the node is executed again, meaning the parameter values passed to downstream nodes are fixed and insusceptible to downstream steps.

    2. Parameters can be transmitted across tasks from a parent task to a subtask. For details, see Invocation Task.

    3. The way to reference a parameter in downstream nodes of the same branch as the Parameter Assignment node is as follows:

    • The value is a single string or a single number: =${Parameter name}

    • The value is more than one string or more than one number: in (${Parameter name})

    iconNote:
    Unlike custom parameters, parameters output by the Parameter Assignment node require no single quotes for referencing. You can simply reference the parameter in the format of ${Parameter_name} after defining the separator correctly in the node.

    Batch Parameter Generation 

    Click the Batch Generation button to generate parameters in batches.

    Select the source column to generate the corresponding parameter. The parameter name is generated automatically in the format of Field name_Parameter. (The parameter name is suffixed with _Parameter if identical names exist until there is no duplicates.

    Batch Parameter Modification 

    Select multiple parameters to be modified, and click Modify Source Row to modify the parameters in batches, as shown in the following figure.

    Batch Parameter Deletion 

    Select multiple parameters to be deleted, and click Delete to delete the parameters in batches, as shown in the following figure.

     

    Notes 

    If the preview fails in the Output Parameter step and an error message saying "param unable to get the specified row and column data" appears, the data output by the parameter is empty, and this error can be ignored. The task can be executed normally. 

     

     

     

     

     


    附件列表


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