Table of Contents

Search

  1. Preface
  2. Part 1: Introduction
  3. Part 2: PowerExchange Client for PowerCenter (PWXPC)
  4. Part 3: PowerExchange ODBC
  5. Appendix A: PowerExchange Interfaces for PowerCenter Tips
  6. Appendix B: Datatypes and Code Pages
  7. Appendix C: PowerExchange Interfaces for PowerCenter Troubleshooting

PowerExchange Interfaces for PowerCenter

PowerExchange Interfaces for PowerCenter

Configuring Mappings with Flexible Target Key Transformations

Configuring Mappings with Flexible Target Key Transformations

The PowerExchange Change Data Capture (CDC) source will now need to be imported. This must be done through the Import from PowerExchange option under Source Analyzer in the PowerCenter Designer.
After the CDC source has been imported, the target definitions will be required. Import them in the Target Designer in the PowerCenter Designer.
The following figure shows an example structure of a source CDC table that works with a DB2 data capture source and a DB2 target table:
The source definitions includes several columns with a prefix of DTL and also includes a CUSTOMER_ID column, which is the primary key.
The columns prefixed DTL_CI and DTL_BI are the change indicator and before image, respectively. These columns are necessary for this flexible transformation. The DTL__CAPX columns are PowerExchange capture columns.
The following figure shows the structure of the target DB2 table:
The target table has a primary key of PARTNER_CUST_ID and also includes the SURNAME, FIRST_NAME, and CUSTOMER_ID columns.
The source table has a primary key of CUSTOMER_ID, and the PARTNER_CUST_ID is an attribute of the table. The transformation will load the data into the target table where the PARTNER_CUST_ID is the primary key, and the CUSTOMER_ID is an attribute of that table.
In this case, if the PARTNER_CUST_ID changes in the source table, a delete and insert will be required for the target.
Drag the PowerExchange CDC source, and the target into the mapping.
Any of the control information including BI and CI columns could, if required, be defined in the target definition.
To configure a mapping with a Flexible Target Key transformations:
  1. From the
    Transformation
    option, select
    Create
    .
  2. Select a transformation type of
    Flexible Target Key
    and click
    Create
    .
    The transformation is inserted into the mapping.
  3. Link into the transformation the required columns from the source for the target.
    Also, the transformation will require the BI and CI indicators that were assigned earlier in PowerExchange. A final column DTL__CAPXACTION should also be added to the transformation.
    The BI and CI columns need to be linked to the Flexible transformation.
  4. Right-click the transformation you have just created. Select
    Edit,
    and then select the
    Source Column Map
    tab.
  5. Add the columns to which the relevant before images and change indicators are assigned.
    Multiple columns can be added here when the target primary key demands.
  6. Link the transformation to the target.
    Only link the required data columns from the transformation to the target. No links will exist from the transformation to the target for the CI and BI columns, nor for the DTL__CAPXACTION column unless required in the target.
  7. Create the workflow from the mapping as normal.

0 COMMENTS

We’d like to hear from you!