Skip to main content

Db2

Overview

The IBM Db2 source allows you to sync data from Db2. It supports both Full Refresh and Incremental syncs. You can choose if this connector will copy only the new or updated data, or all rows in the tables and columns you set up for replication, every time a sync is run.

This IBM Db2 source connector is built on top of the IBM Data Server Driver for JDBC and SQLJ. It is a pure-Java driver (Type 4) that supports the JDBC 4 specification as described in IBM Db2 documentation.

Resulting schema

The IBM Db2 source does not alter the schema present in your warehouse. Depending on the destination connected to this source, however, the result schema may be altered. See the destination's documentation for more details.

Features

FeatureSupported?(Yes/No)Notes
Full Refresh SyncYes
Incremental - Append SyncYes
NamespacesYes

Getting started

Requirements

  1. You'll need the following information to configure the IBM Db2 source:
  2. Host
  3. Port
  4. Database
  5. Username
  6. Password
  7. Create a dedicated read-only Airbyte user and role with access to all schemas needed for replication.

Setup guide

1. Specify port, host and name of the database.

This step is optional but highly recommended allowing for better permission control and auditing. Alternatively, you can use Airbyte with an existing user in your database.

Please create a dedicated database user and run the following commands against your database:

-- create Airbyte role
CREATE ROLE 'AIRBYTE_ROLE';

-- grant Airbyte database access
GRANT CONNECT ON 'DATABASE' TO ROLE 'AIRBYTE_ROLE'
GRANT ROLE 'AIRBYTE_ROLE' TO USER 'AIRBYTE_USER'

Your database user should now be ready for use with Airbyte.

3. Create SSL connection.

To set up an SSL connection, you need to use a client certificate. Add it to the "SSL PEM file" field and the connector will automatically add it to the secret keystore. You can also enter your own password for the keystore, but if you don't, the password will be generated automatically.

Changelog

VersionDatePull RequestSubject
0.2.02023-12-1833485Remove LEGACY state
0.1.202023-06-2027212Fix silent exception swallowing in StreamingJdbcDatabase
0.1.192023-03-2220760Removed redundant date-time datatypes formatting
0.1.182023-03-0623455For network isolation, source connector accepts a list of hosts it is allowed to connect to
0.1.172022-12-1420436Consolidate date/time values mapping for JDBC sources
2022-10-1315535Update incremental query to avoid data missing when new data is inserted at the same time as a sync starts under non-CDC incremental mode
0.1.162022-09-0616354Add custom JDBC params
0.1.152022-09-0116238Emit state messages more frequently
0.1.142022-08-1814356DB Sources: only show a table can sync incrementally if at least one column can be used as a cursor field
0.1.132022-07-2214714Clarified error message when invalid cursor column selected
0.1.122022-07-1414574Removed additionalProperties:false from JDBC source connectors
0.1.112022-06-1713864Updated stacktrace format for any trace message errors
0.1.102022-04-2912480Query tables with adaptive fetch size to optimize JDBC memory consumption
0.1.92022-02-2110242Fixed cursor for old connectors that use non-microsecond format. Now connectors work with both formats
0.1.82022-02-1810242Updated timestamp transformation with microseconds
0.1.72022-02-1410256Add -XX:+ExitOnOutOfMemoryError JVM option
0.1.62022-02-0810173Improved discovering tables in case if user does not have permissions to any table
0.1.52022-02-019875Discover only permitted for user tables
0.1.42021-12-309187 8749Add support of JdbcType.ARRAY to JdbcSourceOperations.
0.1.32021-11-057670Updated unique DB2 types transformation
0.1.22021-10-257355Added ssl support
0.1.12021-08-134699Added json config validator
0.1.02021-06-224197New Source: IBM DB2