Changing data topic names and mapping multiple source tables

You can change data topic names, map multiple source tables to a single data topic, or do both by adding the MAP_* properties to a KCOP properties file.

Procedure

Use MAP_TABLE_ as a prefix to a CDC Replication-generated topic name to explicitly map a source table to a given data topic. The property format is as follows:
MAP_TABLE_instance.source-identifier.sourcedb.schema.table=remapped-topic

To explicitly map multiple source tables to a single topic, specify more than one MAP_TABLE_* property:

MAP_TABLE_instance.source-identifier.sourcedb.schema.table=remapped-topic
MAP_TABLE_instance.source-identifier.sourcedb.schema.table=remapped-topic

All source tables that do not have a corresponding MAP_TABLE_* property are mapped according to the MAP_DEFAULT property if you choose to specify it. Otherwise, the CDC Replication-generated topic name is used.

The following example maps all tables to the default topic default-topic, except the table instance.source-identifier.sourcedb.schema.table, which is mapped to the topic remapped-topic:

MAP_DEFAULT=default-topic
MAP_TABLE_instance.source-identifier.sourcedb.schema.table=remapped-topic

To map all source tables to a single topic, use one of these methods:

  • Specify the MAP_DEFAULT property without specifying any MAP_TABLE_* properties.
  • Specify the MAP_ALL property. If you use the MAP_ALL property, then all other MAP_* properties are ignored.

To map all source tables to a single topic, use the MAP_ALL property:

MAP_ALL=all-topic
Important:
  • The KcopTopicMappingIntegrated KCOP is deprecated starting with Version 11.4.0.3-5582. The functionality that is described above is now available for all KCOPs that are shipped with CDC Replication.
  • If a topic name that is generated by CDC Replication includes non-ASCII characters, you must escape these characters by using the Unicode escape syntax. For example, for the topic name instance.source-identifier.sourcedb.§schema.table, you put the following entry in a KCOP properties file:
    MAP_TABLE_instance.source-identifier.sourcedb.\u00a7schema.table=remapped-topic
    

    Where 00a7 is the Unicode code point of the § character.

  • Setting the topic prefix in Management Console by using Kafka properties changes the default topic naming convention. If you set the topic prefix, ensure that you use the following format for MAP_TABLE:
    MAP_TABLE_topic-prefix.schema.table=remapped-topic