All Products
Search
Document Center

Dataphin:Configure the AnalyticDB for MySQL 3.0 Output Component

Last Updated:Mar 05, 2026

The AnalyticDB for MySQL 3.0 output component writes data to a MySQL data source. If you sync data from other data sources to an AnalyticDB for MySQL 3.0 data source, you must configure the target data source in the AnalyticDB for MySQL 3.0 output component after configuring the source data source. This topic describes how to configure the AnalyticDB for MySQL 3.0 output component.

Prerequisites

  • You have created an AnalyticDB for MySQL 3.0 data source. For more information, refer to Create an AnalyticDB for MySQL 3.0 Data Source and .

  • The account used to configure the AnalyticDB for MySQL 3.0 output component must have read-through permission on the target data source. If the account does not have this permission, request it. For more information, see Request Data Source Permissions.

Procedure

  1. On the Dataphin homepage, in the top menu bar, click Develop, and then click Data Integration.

  2. On the Data Integration page, in the top menu bar, select a Project. In Dev-Prod mode, select an Environment instead.

  3. In the left navigation pane, click Batch Pipeline. In the Batch Pipeline list, click the offline pipeline that you want to develop. The offline pipeline configuration page opens.

  4. In the upper-right corner of the page, click Component Library to open the Component Library panel.

  5. In the left navigation pane of the Component Library panel, click Output. In the output component list on the right, locate the AnalyticDB for MySQL 3.0 component and drag it onto the canvas.

  6. Click and drag the image icon from a target input, transform, or flow component and connect it to the AnalyticDB for MySQL 3.0 output component.

  7. Click the image icon in the AnalyticDB for MySQL 3.0 output component card to open the AnalyticDB for MySQL 3.0 Output Configuration dialog box. image

  8. In the AnalyticDB for MySQL 3.0 Output Configuration dialog box, configure the parameters.

    Parameter

    Description

    Basic Settings

    Step Name

    The name of the AnalyticDB for MySQL 3.0 output component. Dataphin generates a step name automatically. You can change it based on your business scenario. Use the following naming rules:

    • Use only Chinese characters, letters, underscores (_), and digits.

    • Use no more than 64 characters.

    Datasource

    The drop-down list shows all AnalyticDB for MySQL 3.0 data sources. It includes data sources for which you have write-through permission and those for which you do not. Click the image icon to copy the current data source name.

    Time Zone

    Time-format data is processed according to the current time zone. By default, this matches the time zone configured for the selected data source. You cannot change this setting.

    Note

    For tasks created before version V5.1.2, choose either Data Source Default Configuration or Channel Time Zone. The default is Channel Time Zone.

    • Data Source Default Configuration: The default time zone of the selected data source.

    • Channel Time Zone: The time zone configured for the current integration task under Properties > Channel Configuration.

    Table

    Select the target table for output data. Enter a keyword to search for a table name, or enter the exact table name and click Exact Search. After you select a table, the system automatically checks its status. Click the image icon to copy the selected table name.

    If the target table does not exist in the AnalyticDB for MySQL 3.0 data source, use the one-click table creation feature to generate it quickly. Follow these steps:

    1. Click Create Table. Dataphin automatically generates the SQL script to create the target table. This includes the table name (default: source table name) and field types (preliminarily converted based on Dataphin fields).

    2. Modify the generated SQL script as needed, then click Create. After the table is created, Dataphin uses it as the target table for output data.

    Note

    If a table with the same name exists in the development environment, clicking Create returns an error that the table already exists.

    Production Table Missing Policy

    The action to take when the production table does not exist. Choose No Action or Automatic Creation. The default is Automatic Creation. If you choose No Action, the task publishes without creating the production table. If you choose Automatic Creation, the task creates a table with the same name in the target environment during publishing.

    • No Action: If the target table does not exist, the system warns you during submission but still allows publishing. You must manually create the target table in the production environment before running the task.

    • Automatic Creation: Edit the CREATE TABLE Statement. The default statement matches the selected table. You can adjust it. The table name in the statement uses the placeholder ${table_name}. Only this placeholder is supported. At runtime, it is replaced with the actual table name.

      If the target table does not exist, Dataphin first runs the CREATE TABLE statement. If table creation fails, publishing fails. Fix the statement based on the error message and publish again. If the target table already exists, Dataphin skips table creation.

    Note

    This setting is available only for projects in Dev-Prod mode.

    Loading Policy

    Select the policy for writing data to the target table. Loading Policy options include the following:

    • Append Data (INSERT INTO): Append data to existing data in the target table without modifying historical data. A dirty data error occurs if a primary key or constraint conflict happens.

    • Replace on Primary Key Conflict (REPLACE INTO): Delete the entire row with a duplicate primary key or constraint, then insert the new data.

    • Update on Primary Key Conflict (ON DUPLICATE KEY UPDATE): Update mapped fields in existing records when a primary key or constraint conflict occurs.

    Batch Write Size (optional)

    The size of data written in a single batch. You can also set Batch Write Count. During write operations, the system writes data when either limit is reached. The default is 32 MB.

    Batch Write Count (optional)

    The default is 2,048 rows. Data synchronization uses a batch-write strategy. Parameters include Batch Write Count and Batch Write Size.

    • When the accumulated data volume reaches either limit—batch write size or batch write count—the system treats it as a full batch and writes it to the destination immediately.

    • Set the batch write size to 32 MB. Adjust the batch write count based on the average record size. Use a larger value to maximize batch efficiency. For example, if each record is about 1 KB, set the batch write size to 16 MB. Then set the batch write count to more than 16,384 (16 MB ÷ 1 KB). Here, we use 20,000 rows. With this setup, the system triggers batch writes when the accumulated data reaches 16 MB.

    Pre-SQL Script (optional)

    An SQL script to run on the database before data import.

    For example, to maintain service availability, run these steps: First, create the target table Target_A. Next, write data to Target_A. After the write completes, rename the live service table Service_B to Temp_C. Then rename Target_A to Service_B. Finally, delete Temp_C.

    Post-SQL Script (optional)

    An SQL script to run on the database after data import.

    Field Mapping

    Input Fields

    Lists input fields from upstream components.

    Output Fields

    Lists output fields. You can perform the following actions:

    • Field Management: Click Field Management to select output fields.

      image

      • Click the gaagag icon to move a field from Selected Input Fields to Unselected Input Fields.

      • Click the agfag icon to move a field from Unselected Input Fields to Selected Input Fields.

    • Batch Add: Click Batch Add to configure fields in JSON, TEXT, or DDL format.

      • JSON format example:

        // Example:
        [{
          "name": "user_id",
          "type": "String"
         },
         {
          "name": "user_name",
          "type": "String"
         }]
        Note

        The name field specifies the name of the field to import, and the type field specifies the field type after import. For example, "name":"user_id","type":"String" imports the field named user_id and sets the field type to String.

      • TEXT format example:

        // Example:
        user_id,String
        user_name,String
        • The row delimiter separates field entries. The default is a line feed (\n). Other options are semicolon (;) and period (.).

        • The column delimiter separates field names from field types. The default is a comma (,).

      • DDL format example:

        CREATE TABLE tablename (
            id INT PRIMARY KEY,
            name VARCHAR(50),
            age INT
        );
    • Create Output Field: Click + Create Output Field. Enter the Column name and select the Type. Click the image icon to save the row.

    Mapping

    Manually map fields between upstream inputs and target table fields. Mapping options include Row-Based Mapping and Name-Based Mapping.

    • Name-Based Mapping: Maps fields with identical names.

    • Row-Based Mapping: Maps fields by position when source and target field names differ.

  9. Click Confirm to complete the configuration of the AnalyticDB for MySQL 3.0 output component.