All Products
Search
Document Center

Dataphin:Configure the AnalyticDB for MySQL 3.0 Output Component

Last Updated:Jun 04, 2026

The AnalyticDB for MySQL 3.0 output component writes data to a MySQL data source. When syncing data from other sources to AnalyticDB for MySQL 3.0, configure the target data source in this output component after configuring the source.

Prerequisites

Procedure

  1. On the Dataphin homepage, choose Develop > Data Integration.

  2. On the Data Integration page, select a Project. In Dev-Prod mode, select an Environment.

  3. In the left navigation pane, click Batch Pipeline. In the Batch Pipeline list, click the target offline pipeline to open its configuration page.

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

  5. In the Component Library panel, click Output, find AnalyticDB for MySQL 3.0, and drag it onto the canvas.

  6. Drag the image icon from an input, transform, or flow component to 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

    Auto-generated name for this output component. You can rename it. Naming rules:

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

    • Use no more than 64 characters.

    Datasource

    Lists all AnalyticDB for MySQL 3.0 data sources, including those you lack write-through permission for. Click the image icon to copy the data source name.

    Time Zone

    Time-format data uses the time zone of the selected data source. This setting is read-only.

    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. Search by keyword, or enter the exact name and click Exact Search. The system checks the table status after selection. Click the image icon to copy the table name.

    If the target table does not exist, create it:

    1. Click Create Table. Dataphin generates a CREATE TABLE script with the default table name (source table name) and field types converted from Dataphin fields.

    2. Modify the script as needed and click Create. Dataphin uses the created table as the output target.

    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

    Action when the production table does not exist. Options: No Action or Automatic Creation. Default: Automatic Creation.

    • No Action: The system warns during submission but allows publishing. Create the target table manually in the production environment before running the task.

    • Automatic Creation: Edit the CREATE TABLE Statement. The default matches the selected table. The table name uses the placeholder ${table_name}, which is replaced with the actual name at runtime.

      Dataphin runs the CREATE TABLE statement if the target table does not exist. If creation fails, fix the statement and republish. Existing tables are skipped.

    Note

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

    Loading Policy

    Loading Policy for the target table:

    • Append Data (INSERT INTO): Appends data without modifying existing rows. Primary key or constraint conflicts cause dirty data errors.

    • Replace on Primary Key Conflict (REPLACE INTO): Deletes the conflicting row and inserts the new data.

    • Update on Primary Key Conflict (ON DUPLICATE KEY UPDATE): Updates mapped fields in existing records on conflict.

    Batch Write Size (optional)

    Size of data written per batch. The system writes when either this limit or Batch Write Count is reached. Default: 32 MB.

    Batch Write Count (optional)

    Default: 2,048 rows. Batch Write Count works with Batch Write Size — the system writes when either limit is reached.

    • When either limit is reached, the system writes the accumulated data as a full batch.

    • Adjust based on average record size. For example, with ~1 KB records and a 16 MB batch write size, set the count above 16,384 (16 MB ÷ 1 KB), such as 20,000 rows.

    Pre-SQL Script (optional)

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

    Example: To maintain availability, create Target_A, write data to it, rename Service_B to Temp_C, rename Target_A to Service_B, then 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. Available 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

    Map fields between upstream inputs and the target table. Mapping options: 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 save the AnalyticDB for MySQL 3.0 output component configuration.