Synchronizing DDL Changes Using Scheduled Task

  • Last update: October 15, 2024
  • Overview

    Version

    FineDataLink VersionFunctional Change

    4.1.5.4

    /

    4.1.8.2

    Prompted “Update Field Mapping” in case of structure changes in source tables of DB tables. For details, see the section "Field Mapping Updates."

    4.1.9.3

    • Allowed customizing field type mapping rules and configuring valid data connections.

    • Prioritized the customized mapping rules of data connections over the default rules in scenarios including automatic table creation, DDL change synchronization via pipeline tasks, and DDL change prompting in scheduled tasks.

    4.1.11.2

    Supported a partial DDL synchronization function for the YMatrix database in the scheduled task.

    Application Scenario

    You have created scheduled synchronization tasks using Data Development and want to be informed of DDL changes in the source data table for prompt processing and notify other users.

    Function Description

    You can be prompted for DDL changes in the source data table of a scheduled task and notify specified users.

    You can process the target table fields to update the target table structure on the task configuration page.

    Function Description

    DDL Change Detection

    After you enable DDL Change Detection, the source table structure is compared with the target table structure configured in the current node during each execution to detect the changes. Enable Result Notification in Task Control to automatically notify the specified user if DDL changes.

    Category

    Description

    Supported Data Sources

    Source data sources: SQLServer, Oracle, PostgreSQL, and MySQL

    Target data sources: ClickHouse, GaussDB, Greenplum, MySQL, Oracle, PostgreSQL, SeaboxMPP, SQL Server, TiDB, RedShift, and YMatrix

    Condition

    Select Table Selection under Data Source > Configuration Method of the Data Synchronization node.

    Detectable DDL changes include adding, deleting, and renaming the field, as well as modifying the field type or length in the source table.

    Field Mapping Update

    If you select SQL Server, Oracle, PostgreSQL, or MySQL databases as the data source, you will be prompted to update the field mapping when the source table structure is changed, as shown in the following figure.

    iconNote:

    This function is also applicable to the DB Table Output operator.

    Click Update Field Mapping to view the changes of added, deleted, and modified fields. Click OK to update the field mapping according to the changes, as shown in the following figure.

    The following table displays the categories of field mapping updates:

    Changes in Source Table Fields

    Categories in the Field Mapping Table

    Delete a field.

    Field Deletion

    Add a field.

    Field Addition

    Rename a field.

    The original field name is in the Field Deletion category, and the new field name is in the Field Addition category.

    Modify the field type or length.

    Field Type/Length Modification

    Target Table Update

    If Existing Table is selected as the target table and the source field has changed, you can modify the field mapping by selecting the existing fields or manually adding fields. After you confirm the changes in the mapping relationships, the DDL statement for the target table is generated and executed.

    Category

    Description

    Supported Data Sources

    Target data sources: ClickHouse, GaussDB, Greenplum, MySQL, Oracle, PostgreSQL, SeaboxMPP, SQL Server, TiDB, RedShift, and YMatrix

    Condition

    Select Existing Table under Data Destination and Mapping > Target Table of the Data Synchronization node.

    Procedure

    Source Table Structure Detection

    Drag a Data Synchronization node to the design page, select Table Selection under Data Source > Configuration Method, select the source table, and configure data filtering, as shown in the following figure.

    Go to the Data Destination and Mapping tab page, configure the target data table, and enable DDL Change Detection. Configure the items on the Write Method tab page. Ensure the Data Synchronization node can run normally, as shown in the following figure.

    Result Notification Configuration

    To inform users of DDL changes, enable DDL Change Detection on the Data Destination and Mapping tab page, and enable Result Notification under Task Control > Result Notification, as shown in the following figure.

    If DDL changes occur in the source table during the task execution, the specified user will be notified through the specified channel. For example, if you set Platform as Notification Channel, the user will be prompted by platform messages.

    The log also prompts the changes in the source table structure. An error is reported for DDL changes that affect the actual data writing. In other cases, the task is executed normally.

    Field Mapping Update

    Click Update Field Mapping on the Data Destination and Mapping tab page, where you can adjust the field mapping without affecting the target table structure, as shown in the following figure.

    Click OK to view the updated field mapping, as shown in the following figure.


    Target Table Update

    If you select Existing Table as Target Table, you can click Update Target Table to confirm or add mapping relationships.

    Adjust the field mapping by selecting existing fields in the target table or adding fields manually. Click Update to view the DDL statements to be written into the target table.

    You can view the changes in the target database table after executing the DDL statements.

    Subsequent Operation

    You can continue to execute the scheduled task after synchronizing the DDL change in source tables.

    附件列表


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