Mappings |
Scroll |
Precisely recommends allowing the REPLICATE command to automatically manage Topics and their associated Metadata to provide the best transition from JSON to AVRO payloads. Sometimes however there may be a requirement to manually specify that information. Two methods are provided to link source objects with targets providing explicit specification of both Topics and object level metadata using either Static or Dynamic means.
Static and Dynamic Mappings can both override and compliment the default mapping provided by the REPLICATE command:
1.If MAPPINGS are not not specified, the default behavior will replicate every CDC record published to the replicator. The fully qualified table name or IMS DBD from the CDC record can be replaced by a single Topic name but only if the format is JSON. Both JSON and AVRO formats are supported if the Topic name is specified with the * (asterisk) substitution parameter with/without using <prefix>_*_<suffix> notation. In both cases however the JSON/AVRO (header/payload) will not contain the "alias": "<alias_name>" object-value pair.
2.Static MAPPINGS can modify the default behavior when the default Topic name is specified with the * (asterisk) substitution parameter by explicitly specifying the Topic and object level metadata for one or more source object names. This compliments the default behavior enabling continuous operation even when new source objects are encountered for the first time by the Replicator and where the Replicator script has not been revised to provide for non-default options including Topic Names, AVRO Confluent Subjects, Aliases, etc.
3.Dynamic MAPPINGS are enabled through an "Exit" providing even more flexibility over both Topic names and object level metadata and can also be used to determine how the Replicator behaves when an unrecognized source object is encountered by either providing a specific default Topic template, terminating execution of the Replicator or Ignoring new source objects entirely.
4.The previously mentioned OPTIONS statement keyword IGNORE NOMAPPING also specifies that CDC records for objects that have no Static Mapping SOURCE specifications will be ignored.
5.Finally, some Kafka/AVRO configurations may not allow dynamic generation/registration of either Topics or Schemas effectively preventing the default automatic Topic/Metadata registration behavior. That limitation will require some combination of these options if uninterrupted streaming is required.