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. Target Messaging Systems
  7. Configuring PowerExchange CDC Publisher
  8. Streaming Change Data
  9. Monitoring PowerExchange CDC Publisher
  10. Administering PowerExchange CDC Publisher
  11. Appendix A: Command Reference for the Command-Line Utilities
  12. Appendix B: Avro Schema Formats
  13. Appendix C: Custom Pattern Formats
  14. Appendix D: Message Reference

User Guide

User Guide

Column Attributes

Column Attributes

Column attributes define how PowerExchange CDC Publisher processes individual columns. You can define columns to have a unique tag, exclude columns from processing, wrap column values with one or more characters based on the column data type, change the data type description of a column, or changing the format of date and time columns using masking.
PowerExchange CDC Publisher applies column attributes in the following order:
  1. <TAG> Tag columns so that the name of the column can be used as a tag.
  2. <EXCLUDE> Exclude columns from PowerExchange CDC Publisher generated message output.
  3. <DT_SWAP> Change the data type descriptions of columns.
  4. <DT_MASK> Change the date or time format using masks.
  5. <DT_QUOTES> Delimit the data type values with a quotation mark or other character.
The following table describes the tags that you can use within the Column Attributes section of a custom pattern file.
Tag
Description
<DT_MASK>
With date and time masking, you can change the date, time, and timestamp formats. Use one of the following syntax options:
Option 1:
<DT_MASK><column_name>
xxxxxxxxx
</column_name> <format>MM/dd/yyyy</format></DT_MASK>
Where
xxxxxxxx
is the name of the column to mask. MM/dd/yyyy is the date format you want to use. The format is specified by the <format> tag. The format you specify for the column must be appropriate for the column data type.
Option 2:
<DT_MASK><data_type>date|time|timestamp</data_type> <format>MM/dd/yyyy</format><DT_MASK>
Where the data type is appropriate for the mask. All columns that have the specified data type are masked.
  • If the data type of the column does not permit the format you provide, the column is not masked.
  • Column masks take precedence over data type masks.
You can enter any character string that the Java class DateTimeFormatter supports for formatting dates and times. For more information, see the Java documentation.
The input date formats that you can use are: PowerExchange Change Data Capture formatted Date, Time, or Timestamp.
<DT_QUOTES>
You can wrap column values with one or more characters, based on the data type of the column. Specify this tag for each data type where a value requires a double-quotation mark character.
The following syntax wraps the value of the column with quotation mark characters:
<DT_QUOTES><data_type>string</data_type><quote_character>" </quote_character></DT_QUOTES>
Where <quote_character> specifies the character that wraps the column value.
CDC Publisher does not validate the wrap character. The wrap character can be any character, or characters, you choose.
By default, a data type that is not defined with the <DT_QUOTES> tag does not have column values that are wrapped by the wrap character. If needed, you can explicitly specify <DT_QUOTES> with an empty quote value, for example:
<DT_QUOTES><data_type>string</data_type><quote_character> </quote_character></DT_QUOTES>
Typically, the following data types are quoted:
  • String
  • Date
  • Time
  • Timestamp
  • Binary
You can use the <quote_null_values> tag to indicate whether null column values are quoted. Valid values are:
  • true
    . Null values are quoted based on the column data type and <DT_QUOTE> settings.
  • false
    . Null column values are never quoted. Data type and other <DT_QUOTE> settings are ignored.
Default is false. For example:
<DT_QUOTES><quote_null_values>false</quote_null_values> </DT_QUOTES>
<DT_SWAP>
Use this tag to change the data type description of a specific column or to change one data type description to another data type description for all columns.
To change the data type description of a specific column, use the following syntax:
<DT_SWAP><column_name>
xxxxxxxxx
</column_name> <old_data_type>
yyyyyyyy
</old_data_type> <new_data_type>
zzzzzzzzz
</new_data_type></DT_SWAP>
Where
xxxxxxxx
is the name of the column, and
yyyyyyyyy
is the data type description to be changed to the new data type description
zzzzzzzzzz
. The data type description you specify for the column must be appropriate for the data value of the column. The data type is not edited and can be any value you choose.
To change a data type description to another data type description for all columns of a specific data type, use the following syntax:
<DT_SWAP><old_data_type>
yyyyyyyy
</old_data_type> <new_data_type>
zzzzzzzzz
</new_data_type></DT_SWAP>
<EXCLUDE>
To exclude columns from PowerExchange CDC Publisher generated message output, use the following syntax:
<EXCLUDE><column_name>
xxxxxxxx
</column_name></EXCLUDE>
Where
xxxxxxxxx
is the name of the column to exclude.
Wildcard characters are permitted at the beginning and end of column names. For example:
  • A column name of FieldX_* excludes all columns with names that begin with “FieldX_”.
  • A column name of INFA* excludes all columns with names that start with “INFA".
  • A column name of DTL* excludes all PowerExchange-generated columns with names that start with “DTL__”.
  • A column name of *_field_Present excludes all columns that contain a suffix of “_field_Present”.
<TAG>
To tag a column so that the name of the column can be used as a tag, use the following syntax:
<TAG><column_name>
xxxxxxxx
</column_name></TAG>
Where
xxxxxxxx
is the column name to use for the new tag. The column name must be a valid column name that is defined in the source data. After you tag the column, you can use the column name in a custom pattern.
If the specified column name does not appear in the table schema, an exception occurs at run time.

<DT_SWAP> Example

The following example changes the data type Column1 description from string to "Int32".
<DT_SWAP><column_name>Column1</column_name><old_data_type>string</old_data_type> <new_data_type>int32</new_data_type></DT_SWAP>

<EXCLUDE> Examples

The following examples show several ways to exclude specific columns from the message output.
To exclude columns with names that begin with "INFA":
<EXCLUDE><column_name>INFA*</column_name></EXCLUDE>
To exclude columns that are named "Column1":
<EXCLUDE><column_name>Column1</column_name></EXCLUDE>
To exclude columns with names that end in "_BeforeImage":
<column_name>*_BeforeImage</column_name></EXCLUDE>

<TAG> Example

The following example allows the tag <Column1> to be used in other patterns as a tag:
<TAG><column_name>Column1</column_name></TAG>

0 COMMENTS

We’d like to hear from you!