While Automatic AVRO Schema registration and management is clearly preferred, sometimes for procedural or technical reasons there is a requirement to modify schemas in some way or otherwise intervene in their registration including:
- A restriction on the automatic update of the "Production" Confluent Schema Registry. Highly discouraged by Precisely, the worse reason for disabling automatic registration due to the inevitable complication of procedures and potential for errors that will impact production.
- A requirement to modify the "Default" transformation of source field/column names from their original form to the JSON standard. Precisely highly recommends using the default, all lower case words separated by under-score characters.
- A requirement to modify the datatype for one or more fields/columns.
Switching to semi-automatic schema registration is not complicated but must be accompanied by either a very effective manual or automated procedure:
- Remove or do not include the CONFLUENT REGISTRY and its url in the Apply Engine OPTIONS parameter list.
- Create a section in the script that lists the Topics and Topic ID for every Description to be replicated. Many prefer to create a new Engine "Part" file that will be included when the script is parsed just like Descriptions and Procedures.
- Parse the Apply Engine script to create a full set of JSON topic descriptions in the Working directory.
- Modify any of the generated description files as required either manually or using automation.
- Register any schema that is modified and record the TOPIC ID for each schema in the new "Topic ID" section of the script or the Topic/ID include file either manually or using automation.Note: Apply engines that utilize the REPLICATE function, for DB2, IMS and VSAM source data still require manual intervention to add/update the source DESCRIPTION parts that correspond to new and altered RDBMS schemas and IMS or VSAM "copybooks". Once that has been accomplished however, the Apply Engine need only be Parsed and the procedure above followed when registration of the updated AVRO schemas will not be performed automatically. Even Version 4 Apply Engines that have "customized" target DESCRIPTIONS and mapping PROCEDURES will benefit because the Target DESCRIPTIONS used to create the AVRO schemas will be automatically validated before registration when the Engine is Started.
Example 1 Db2 to AVRO
Review the Db2 to Kafka AVRO example in Automatic AVRO Schema Registration. Switching to Semi-Automatic schema registration is straight forward and simple.
Only a few elements of the Apply to Kafka AVRO script need to be added or altered as identified by a green bar in the first character of modified lines. Items in RED are removed/Replaced: