To add a new source table or object to a PowerExchange CDC Publisher change data stream, you must create a PowerExchange extraction map definition for the new table and restart the PwxCDCPublisher process. Optionally, you can generate an Avro format definition (schema) for the table so that you can verify it.
If you do not generate the Avro schema, the CDC Publisher will automatically generate it when change data is received for the new source table.
Shut down the PwxCDCPublisher process by issuing the PwxCDCAdmin SHUTDOWN command.
You can issue the command from the
pwxcdcpub_root_installation
\bin
subdirectory or from another location if you specified the PWXPUB_HOME environment variable. For more information, see
Shutting Down the CDC Publisher.
Shut down the PowerExchange Logger for Linux, UNIX, and Windows.
For more information, see the
PowerExchange CDC Guide for Linux, UNIX, and Windows
.
In the PowerExchange Navigator, create a capture registration and associated extraction map for the new source table. Activate the capture registration.
To retrieve extraction map information for all source tables from PowerExchange, including the new table, enter the PwxCDCAdmin command with the RESET=FORMAT parameter at the command prompt. Include the optional INSTANCE parameter if you are using an instance other than the default "instanceA" at
/
pwxcdcpub_root installation
/instanceA
.
Use the following syntax:
PwxCDCAdmin RESET=FORMAT [INSTANCE=
override_instance_directory
]
Alternatively, you can wait until the CDC Publisher first receives change data for the new table. At that point, the CDC Publisher automatically caches the extraction map and generates the Avro schema.
If you specified the PwxCDCAdmin RESET=FORMAT command and want to force the generation of the Avro schema for the new table so that you can verify that it properly reflects the table structure, enter the PwxCDCAdmin command with the REPORT=FORMAT and TABLE parameters at the command prompt. The TABLE parameter is required. Include the optional INSTANCE parameter if you are using an instance other than the default "instanceA" at
/
pwxcdcpub_root installation
/instanceA
.
Use the following syntax:
PwxCDCAdmin REPORT=FORMAT TABLE=
mapname_tablename
[INSTANCE=
override_instance_directory
]
In this syntax,
mapname_tablename
represents the table name portion of the new extraction map name, where the extraction map name has the format
xnninstance
.
mapname
_
tablename
.
This command generates the updated Avro schema in the
\
instance
\reports
subdirectory. The schema is generated in a legible format. The generated schema can be used for verification purposes and by consumer applications.