tencent cloud

Feedback

DB2 Data Source

Last updated: 2024-11-01 17:48:13

    Use Limits

    Note:
    Supports reading view tables.
    1. The DB2 Writer obtains protocol data generated by the Reader through the Data Synchronization Framework and writes it to DB2 using an 'insert into' statement (rows with primary key/uniqueness index conflicts will not be written). For performance considerations, PreparedStatement + Batch is used, and rewriteBatchedStatements=true is set to buffer the data into the Thread Context Buffer. A write request is initiated only when the Buffer accumulates to the predetermined threshold.
    Note:
    The entire task requires at least insert into permissions. Any additional permissions depend on the statements specified in preSql and postSql during task configuration.
    2. DB2 AES Encryption Algorithm is currently not supported.

    DB2 Offline Single Table Read Node Configuration

    
    
    
    Parameters
    Description
    Data Source
    Available DB2 data source.
    Database
    Supports selecting or manually entering the database name to be read
    By default, the database bound to the data source is used as the default database. Other databases need to be manually entered.
    If the data source network is not connected and the database information cannot be fetched directly, you can manually enter the database name. Data synchronization can still be performed when the Data Integration network is connected.
    Schema
    Supports selection or manual input of the Schema name to be read.
    Table
    Supports selecting or manually entering the table name to be read.
    Split Key
    Specify the field used for data sharding. Once specified, concurrent tasks will be started for data synchronization.
    Filter Conditions (Optional)
    DB2 constructs and executes SQL statements based on the specified 'where' conditions, and extracts data accordingly. In real-world business scenarios, it is common to synchronize the day's data by specifying the 'where' condition as gmt_create>$bizdate. This condition effectively facilitates incremental business synchronization. If this value is empty, it means synchronizing all the information in the entire table.

    DB2 Offline Single Table Write Node Configuration

    
    
    
    Parameters
    Description
    Data Destination
    DB2 data source to be written to.
    Database
    Supports selection or manual input of the database name to write to
    By default, the database bound to the data source is used as the default database. Other databases need to be manually entered.
    If the data source network is not connected and the database information cannot be fetched directly, you can manually enter the database name. Data synchronization can still be performed when the Data Integration network is connected.
    Schema
    Supports selection or manual input of the Schema name to be read.
    Table
    Supports selection or manual input of the table name to write to
    If the data source network is not connected and the table information cannot be fetched directly, you can manually enter the table name. Data synchronization can still be performed when the Data Integration network is connected.
    Whether to Clear Table
    You can manually choose whether to clear the DB2 data table before writing to it.
    Batch Submission Size
    The number of records for batch submission at one time. This value can significantly reduce the number of network interactions between the data synchronization system and DB2, and improve overall throughput. If the value is set too high, it will cause the data synchronization process to run into OOM exceptions.
    Pre-Executed SQL(Optional)
    The SQL statement executed before the synchronization task. Fill in the correct SQL syntax according to the data source type, such as clearing the old data in the table before execution (truncate table tablename).
    Post-Executed SQL (Optional)
    The SQL statement executed after the synchronization task. Fill in the correct SQL syntax according to the data source type, such as adding a timestamp (alter table tablename add colname timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP).

    Data type conversion support

    Read

    DB2 Data Type
    Internal Types
    BIGINT,INTEGER,SMALLINT
    Long
    NUMERIC,DECIMAL,FLOAT,REAL,DOUBLE
    Double
    CHAR,VARCHAR,LONGVARCHAR,NCHAR,CLOB
    String
    TIME,DATE,TIMESTAMP
    Date
    CHAR FOR BIT DATA,VARCHAR FOR BIT DATA
    Bytes

    Write

    Internal Types
    DB2 Data Type
    Long
    BIGINT,INTEGER,SMALLINT
    Double
    DECIMAL,NUMERIC,FLOAT,REAL,DOUBLE
    String
    CHAR,VARCHAR,NCHAR,CLOB,LONGVARCHAR
    Date
    DATE,TIME,TIMESTAMP
    Bytes
    CHAR FOR BIT DATA,VARCHAR FOR BIT DATA
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support