Table of Contents

Search

  1. Preface
  2. PowerExchange CDC Publisher Overview
  3. Installing and Upgrading PowerExchange CDC Publisher
  4. PowerExchange CDC Publisher Key Concepts
  5. PowerExchange Change Capture Environment
  6. Apache Kafka Targets
  7. Configuring PowerExchange CDC Publisher
  8. Streaming Change Data
  9. Monitoring PowerExchange CDC Publisher
  10. Administering PowerExchange CDC Publisher
  11. Command Reference for the Command-Line Utilities
  12. Avro Schema Formats

User Guide

User Guide

Handling Changes to Source Tables and Extraction Maps

Handling Changes to Source Tables and Extraction Maps

PowerExchange CDC Publisher does not update the Avro schemas if the source table structure and extraction map definition change. The extractions map definition must change if the source columns or fields for which change data is extracted change, for example, columns are added or removed.
Use the following procedure to add or remove source columns or fields and resume PowerExchange CDC Publisher processing.
  1. On the source system, stop change activity (inserts, updates, and deletes) on the source table.
  2. Verify that any change data that was captured based on the old source table definition has been extracted from the PowerExchange Logger for Linux, UNIX, and Windows log files.
  3. Shut down the PwxCDCPublisher process by using the PwxCDCAdmin SHUTDOWN command. For more information, see Shutting Down the CDC Publisher.
    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.
  4. Shut down the PowerExchange Logger for Linux, UNIX, and Windows.
    For more information, see the
    PowerExchange CDC Guide for Linux, UNIX, and Windows
    .
  5. In the PowerExchange Navigator, open the original capture registration and set its status to
    History
    .
    For more information, see the
    PowerExchange Navigator User Guide
    .
  6. Alter the source table or object to add or remove columns.
  7. In the PowerExchange Navigator, re-create the capture registration and associated extraction map for the source table. Activate the capture registration.
  8. If you set any PowerExchange CDC Publisher properties that refer to the
    mapname_tablename
    portion of the extraction map name, update the properties to refer to the
    mapname_tablename
    portion of the regenerated extraction map name.
    The extraction map name has the format
    xnninstance
    .
    mapname_
    tablename
    .
    For example, perform this step if you defined the Extract.captureConsumerExcludeNameList and Extract.captureConsumerIncludeNameList filter properties.
  9. On the PowerExchange CDC Publisher system, restart the PwxCDCPublisher process using the RESTART=FROM_END parameter. For more information, see Restarting a PowerExchange CDC Publisher Change Data Stream.
    If you restart the CDC Publisher using the default restart behavior, the FROM_BEGINNING option, or the FROM_CONFIG option, the PowerExchange CDC Publisher issues an error when it tries to process change records based on the previous schema.
  10. To clear the old Avro schemas from cache, enter the PwxCDCAdmin command with the CLEAR=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 CLEAR=FORMAT TABLE={ALL|
    mapname_tablename
    } [INSTANCE=
    override_instance_directory
    ]
    In this syntax,
    mapname_tablename
    is the map name and table name portion of the new extraction map name, where the extraction map name has the format
    xnninstance
    .
    mapname_
    tablename
    . For more information about the command syntax, see PwxCDCAdmin Utility - Command and Parameters.
    The command produces output such as the following example output:
    INSTANCE = instanceA. Connecting to host:port USHOST1:26987 ------------------------------------------------------------------------------ COMMAND RESULT RESULT CODE DESCRIPTION CLEAR_FORMAT 10 The number of Avro Schema definitions cleared
  11. To retrieve extraction map information for all source tables from PowerExchange again, including the regenerated extraction map for the updated 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 updated table. At that point, the CDC Publisher automatically caches the extraction map and generates the Avro schema.
  12. If you specified the RESET=FORMAT command and want to force the generation of the updated Avro schema so that you can verify that it properly reflects the changed table structure, enter the PwxCDCAdmin command with the REPORT=FORMAT and TABLE parameters.
    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={ALL|
    mapname_tablename
    }][INSTANCE=
    override_instance_directory
    ]
    In this syntax,
    mapname_tablename
    is the map name and table name portion of the new extraction map name.
    This command generates new 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.
  13. Warm start the PowerExchange Logger.

0 COMMENTS

We’d like to hear from you!