DB Table Output

  • Last update: December 13, 2024
  • Overview

    Version

    FineDataLink Version

    Functional Change

    4.1.5.4

    1. Displayed the table description when Table Selection was selected as Configuration Method in the DB Table Input operator. For details, see Data Synchronization - Data Source.

    2. In the DB Table Output operator:

    • Obtained the remark of the source field automatically and displayed it in the field mapping area on the Data Destination and Mapping tab page if the data source configuration method was set to Table Selection. Otherwise, the value of the Remark column was --.

    • Allowed you to customize the field remark when Target Table was set to Auto Created Table and the target table supported the writing of field remarks.

    • Displayed the table description when Target Table was set to Existing Tablee. Allowed you to customize the table description when Target Table was set to Auto Created Table.

    For details, see Data Synchronization - Data Destination and Mapping.

    Function Description

    • You can use the DB Table Output operator to output the data processed through a series of steps to the target database.

    • You can use the DB Table Output operator with Data Comparison operator to add, delete, or update the increment.

    • You can set the primary key if Target Table is set to Auto Created Table.

    • You can output data to a table in the specified schema, or create a table in the specified schema to store the processed data.

    Function Description

    1. Functions on the Data Destination and Mapping tab page and the Write Method tab page of DB Table Output are the same as those of Data Synchronization. For details, see Overview of Data Synchronization.

    2. When adding, deleting, or modifying data using Data Comparison and DB Table Output, you can choose the data deletion method between Logical Deletion and Physical Deletion.

    • Logical Deletion: Mark data as deleted without actually deleting it.

    • Physical Deletion: Actually delete data.

    For the specific effects of the two deletion methods, see Differences Between Physical Deletion and Logical Deletion.

    Example One: Logical Deletion

    Scene Simulation

    You can download the example data:test_mubiao.xlstests.xls

    Data in the source table tests is shown in the following figure.

    1.png

    Data in the target table is shown in the following figure.

    2.png

    Data with orderid values of 10345 and 10348 has been deleted from the source table. You want to delete the corresponding data in the target table as well.

    iconNote:
    Since Logical Deletion is to be used, you need to add an identifier column to the target table. The identifier column in this example is named fdl_comparison_type.

    Configuring the Input Operator

    This example uses the DB Table Input operator. Drag in two operators, and rename them Source Table and Target Table, respectively. Configure the Source Table operator first, as shown in the following figure.

    3.png

    Configure the Target Table operator, as shown in the following figure.

    4.png

    Configuring the Data Comparison Operator

    1. Add a Data Comparison operator and connect it to the two input operators.

    2. Select the logical primary key (orderid in this example), which is used to identify the same record in the source and target tables. You can skip the Comparison Field setting since this example requires marking the deleted data only, as shown in the following figure.

    iconNote:

    1. Inserts and deletions of fields not selected as Comparison Field can be detected, but any updates to these fields cannot be detected.

    2. For details about using Data Comparison, see Data Comparison Example.

    5.png

    Click Comparison Result. You can see that the deleted data has been marked, as shown in the following figure.

    6.png

    Configuring the DB Table Output Operator

    1. Add a DB Table Output operator and connect it to the Data Comparison operator.

    2. Configure the target table and the write method, as shown in the following figure.

    • Select Add/Modify/Delete Data Based on Identifier Field as Write Method, select Delete only, and select Logical Deletion.

    • Set Identifier Field to fdl_comparison_type, which is the identifier column generated by default.

    • Set Identifier Value of Delete to Removed, which should correspond to the value of Identifier in the Data Comparison operator.

    • Select orderid as the logical primary key in Primary Key Mapping, which should be the same as that in the Data Comparison operator.

    iconNote:
    After logical deletion, the deleted data is marked in the identifier column. If you tick Perform Logical Deletion on Data Whose Identifier Value is Null Only, only the deleted data whose identifier value is null is marked. Otherwise, all deleted data is marked.

    7.png

    3. Click the Save button in the upper right corner.

    Running the Task

    Click Run in the upper right corner. The message indicating successful execution is displayed in Log if the task is successfully executed, as shown in the following figure.

    8.png

    You can see that the deleted data in the target table has been marked, as shown in the following figure.9.png

    Example Two: Physical Deletion

    For details, see Data Comparison Example.

    附件列表


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