Field-to-Column Splitting

  • Last update: April 16, 2025
  • Overview

    Version

    FineDataLink Version
    Functional Change

    4.1.2

    Added the Field-to-Column Splitting operator, which can split field values according to specific rules (separators or the number of characters) and generate multiple new columns to store the split values.

    4.1.7.3

    Optimized the interactive experience and changed Selected Field to Field to Be Split.

    Function Overview

    The Field-to-Column Splitting operator is added, which can split field values according to specific rules (separators or the number of characters) and generate multiple new columns to store the split values, as shown in the following figure.

    1.2.png

    Usage Restriction

    Only fields with text-type data can be split.

    Example

    Scenario Description

    You can download the example table: Address1.xls.

    The values of the Address field in the data table consist of three parts connected by hyphens (-): country, state, and borough. You can split field values by hyphen (-) to form three new columns: Country, State, and Borough.

    3.1.png

    Table Data Reading

    1. Create a scheduled task, drag a Data Transformation node onto the page, and enter the Data Transformation editing page.

    2. Drag a DB Table Input operator onto the Data Transformation page and configure the operator to read the data to be processed, as shown in the following figure.

    3.2.png

    Field-to-Column Splitting

    1. Drag a Field-to-Column Splitting operator onto the Data Transformation page and configure it to split the Address field into multiple columns, as shown in the following figure.

    3.3-1.png

    The following table describes the setting items.

    Setting ItemDescription

    Field to Be Split

    You can select a field with text-type data from the upstream output for splitting.

    Split Method

    1. By Character Length

    You can enter any positive integer (N), and the field values will be split once every N characters.

    2. By Separator

    Available separators include Semicolon, Comma, Colon, Space, and Custom.

    If you select Custom as Separator, you can input any character or string. The whole input content will be used as the separator to split field values.

    iconNote:
    If you use a special character to split fields, prefix the special character with an escape character (\).

    The logic of splitting fields by separator is described below.

    • The separator is matched from left to right when splitting field values.

    • The separator is used as the boundary to split fields. If no character is on either side of the separator, the new columns will be filled with null values.

    Field Value
    SeparatorColumn After Split

    A

    A

    Empty Empty

    AAA

    A

    Empty Empty Empty Empty

    AAA

    AA

    Empty A

    Split Result

    For Number of New Columns After Split:

    • You can specify the number of columns to retain. Column counting starts from the first split result.

    • The value must be a positive integer from 1 to 100.

    • The default value is automatically generated based on the first 5,000 data records. If the set value exceeds the actual number of split segments, the field values in the extra columns will be empty in Split Result and NULL in Data Preview.

    • The new columns after the split are named Field name_n (the ordinal number of the split segment). In case of duplicate names, n will be incremented by one until the name becomes unique.

    • The data type of the newly generated fields is text by default.

    2. Click Data Preview, as shown in the following figure.

    On the Data Preview page, you can preview the first 1000 rows by default, with 20 rows per page.

    3.3-2.png

    Field Renaming

    Drag a Field Setting operator onto the Data Transformation page. Rename the Address_1, Address_2, and Address_3 fields, as shown in the following figure.

    3.4.png

    Data Output

    1. Add a DB Table Output operator and configure it to output the data after processing, as shown in the following figure.

    3.5.png

    2. Click Save in the upper right corner.

    Effect Display

    1. Click Run to execute the task. The running result in Log upon successful execution is shown in the following figure.

    3.6-1.png

    2. The table data in the database is shown in the following figure.

    3.6-2.png

    附件列表


    主题: Data Development - Scheduled Task
    • 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