All Products
Search
Document Center

Dataphin:Configure field calculation transformation component

Last Updated:Jul 07, 2025

The field calculation transformation component enables calculations on input fields and outputs the results. This topic guides you through the configuration process.

Configure properties

  1. On the top menu bar of the Dataphin homepage, choose Developer > Data Integration.

  2. On the top menu bar of the integration page, select Project. (In Dev-Prod mode, you need to select Environment).

  3. In the left-side navigation pane, click Batch Pipeline. In the Batch Pipeline list, click the offline pipeline that you want to develop to open its configuration page.

  4. Click Component Library in the upper-right corner of the page to open the Component Library panel.

  5. In the left-side navigation pane of the Component Library panel, select Transform. Find the Field Calculation component in the list of transformation components on the right side, and drag it to the canvas.

  6. Click and drag the image icon of the target upstream and downstream components to connect them to the current field calculation component.

  7. Click the image icon in the field calculation component card to open the Field Calculation Configuration dialog box.

  8. In the Field Calculation Configuration dialog box, set the parameters as follows:

    Parameter

    Description

    Step Name

    The name of the field calculation component. Dataphin automatically generates a step name, which you can modify based on your business scenario. The name must meet the following requirements:

    • It can contain only Chinese characters, English characters, underscores (_), and digits.

    • It can be up to 64 characters in length.

    Time Zone Conversion

    If there are String type input and output fields that store time data, you need to specify the time zone information for these fields.

    • Input Field String Time Zone: Takes effect when using functions to convert String type data to Date type. Used to determine the time zone of the source String type data. The default time zone is Asia/Shanghai.

    • Output Field String Time Zone: Takes effect when using functions to convert Date type data to String type. Used to generate String format time data in the specified time zone. The default time zone is Asia/Shanghai.

    Output Fields

    Displays the output fields, including the ordinal number, field (if the name contains a table name, the table name is also displayed), and type. The following management operations are supported:

    • New field: You can manually add output fields. To do this, perform the following steps:

      1. Click New Field.

      2. In the New Field dialog box, configure the parameters.

        • Field name: Can contain only Chinese characters, English characters, underscores (_), and digits, and must be within 64 characters.

        • Data type: Includes String, Long, Double, Date, Boolean, and Bytes data types.

        • Function: You can select supported functions from the function list for field calculation. Click a function name to add it to the expression.

        • Expression: Use functions and source fields in the expression to write the calculation logic for the new field.

        • Source field: Upstream output fields are displayed here. Click a field name to add it to the expression.

      3. Click OK to complete the creation of the new field.

    • Delete field: You can click the icon in the Actionsimage column to delete an existing field.

    • Sort fields: You can drag the image icon to sort the output fields.

  9. Click Confirm to complete the property configuration of the Field Calculation transformation component.