Table Configuration

When you configure a JDBC Multitable Consumer origin, you define a table configuration for each group of tables that you want to read. A table configuration defines a group of tables with the same table name pattern, that are from one or more schemas with the same name pattern, and that have proper primary keys or the same user-defined offset columns.

You can define one or more table configurations.

For example, you can define one table configuration to replicate a database that has a proper primary key for each table. You simply enter the schema name and use the default table name pattern % which matches all tables in the schema.

Let's look at an example where you need to define more than one table configuration. Say that you want to copy a set of tables to an HBase cluster. The SALES schema contains ten tables, but you want to copy only the following four tables:
  • store_a
  • store_b
  • store_c
  • customers

The three store tables use orderID as the primary key. You want to override the primary key for the customers table, and so need to define customerID as the offset column for that table. You want to read all available data in the tables, so do not need to define an initial offset value.

You define one table configuration as follows so that the origin can read the three store tables:
  • Schema - SALES
  • Table Name Pattern - store%
Then you define the second table configuration as follows so that the origin can read the customers table:
  • Schema - SALES
  • Table Name Pattern - customers
  • Override Offset Columns - enabled
  • Offset Columns - customerID