Vous êtes sur la page 1sur 9

Power Exchange

PowerExchange Change Data Capture (CDC) works in conjunction with PowerCenter


to capture changes to data in source tables and replicate those changes to target
tables or files.
Following modes to extract relational and nonrelational data:

Bulk data movement.

Use PWX batch application and relational connections to extract and


load data for relational databases and nonrelational data sets and
files through PowerExchange

Change data capture (CDC) real time


Use PWX CDC Real Time connections for Linux,UNIX, and Windows sources
to extract changed data from condense files in continuous extraction
mode.
CDC batch extraction mode from condense files
Use PWX CDC Change connections to extract changed data from condense
files in batch extraction mode. Power Exchange stops the extraction after
the data from all condense files is read.

1. PowerExchange CDC Components


Multiple PowerExchange components are involved in change data capture
processing.
1.1.

PowerExchange Listener

The Power Exchange Listener coordinates activities across systems, initiates


requests, or processes requests. Handles all tasks that use capture registrations
and extraction maps.

Communicates with the PowerExchange Navigator interface.


Communicates with the PowerExchange Client for PowerCenter (PWXPC)
to integrate with PowerCenter.
Run processes to extract data for client requests.

Capture registration is used to identify and also whether to use Power Exchange
Condense full or partial processing of change data columns in a source table for
which to capture changes. An extraction map is a definition of a change data
extraction for a source table. Power Exchange generates an extraction map
when you create a capture registration. When you create capture registrations
for the DB2 source tables or perform database row tests in the Power Exchange
Navigator, select the node name for the remote system in the Location field.

1.2.

PowerExchange Condense

PowerExchange Condense captures change data and stores the data in condense
files. The condense files store only the successfully completed UOWs, in
chronological order by end time. When an extraction session runs, the data is
extracted from the condense files rather than from the change stream. If you
add or edit capture registrations, you must restart the PowerExchange Condense
job to activate the additional or changed registrations.
1.3.

PowerExchange Navigator

The PowerExchange Navigator is a Windows graphical user interface from which


you create and maintain capture registrations and extraction maps. You can also
define data maps if you need to do column-level processing, such as building
expressions to populate user-defined columns. The PowerExchange Navigator
automatically generates a corresponding extraction map.

2. PowerExchange Condense Overview


PowerExchange Condense Overview When you create a capture registration for a
data source, you must set the Condense option to Full or Part to indicate the
type of condense processing. If you select Full, PowerExchange Condense uses
full condense processing. PowerExchange Condense records only the last change
made to a row in a condense file. If multiple changes are made to the same row,
later changes override earlier changes. If you select the Part option,
PowerExchange Condense uses partial condense processing. It does not
eliminate any change. During a partial condense cycle, PowerExchange
Condense writes all of the changes for successfully completed UOWs to
condense files, in chronological order by UOW end time

3. Steps to get update record form CDC Batch Execution


3.1.
Target is SQL table
In the following process, our source is DB2 table and target is SQL table. You
should create the mapping with DB table as a source and SQL table as a target.
1.
2.
3.
4.
5.
6.

Open Workflow
Create a session for the mapping described above.
Open the session in edit mode
Go to mapping panel
Select Source folder from Navigator window
In the right side the following window will be opened, select the
highlighted button

7.

Select PWX_DB@zOS_CDC_test1 as shown in picture below

8.
9.

Click Ok
In the Properties tab of Source Enter the source table name as
highlighted in the picture below

10. To get the table name go to mapping in power center and double click on
source and select the name highlighted below

11. In the session property Select target folder from navigator window
12. In the right side of window, the following window will be opened
13. Select the highlighted to give the source DB

14. Select the SQODS from Microsoft SQL Server

15. Click ok
16. Select Insert, Update as update and Delete check boxes from Properties
window.

17. Click ok to close the edit task window


18. Save the configuration
a) Record insertion
O Insert a record into sr2reo.TFFOHSTUAT as the given query below
1)
2)
3)
4)

Insert records into sr2reo.TFFOHSTUAT


Go to workflow and cold start the session
It take few minutes to update the target folder
The following out will be shown for the three record insertion

5) Go to MS SQl and select the particular record


6) You will get your Inserted record with the DTL_CAPXACTION field having
value I (if you have selected this field from source to be stored in target
in mapping)
b) Record Updation
1) update records into sr2reo.TFFOHSTUAT
2) Go to workflow and cold start the session
3) It take few minutes to update the target folder
4) The following out will be shown for one record updation

5) Go to MS SQl and select the particular record


6) You will get your updated record with the DTL_CAPXACTION field having
value U (if you have selected this field from source to be stored in target)
c) Record Deletion
1) Delete and update the records from sr2reo.TFFOHSTUAT
2) Go to workflow and cold start the session
3) It take few minutes to update the target folder
4) The following out will be shown

3.2.
Target is FlatFile
In the following process, our source is DB2 table and target is flatfile. You
should create the mapping with DB table as a source and flatfile as a target.
1.

Repeat 12 steps same as briefed in Section 3.1

2.

In the properties section select the highlighted checkbox to avoid the


override previous data

3.
4.
5.
6.
7.

Click ok to close the session window


Cold start the session it will get all the record updated earlier
Now insert, update and delete a records in the DB
Cold start again the session
I have performed 2 Insertion, 1 Updation and 1 Deleteion and the result
of these operation is shown below

8.

You will get your Inserted, update and deleted record entries in the flat
file with the DTL_CAPXACTION field having value
I: insertion

U:Updation
D:Deletion
(if you have selected this field from source to be stored in target )

Vous aimerez peut-être aussi