Change capture

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
seanc217
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 15, 2005 9:22 am

Change capture

Post by seanc217 »

I have a table where the key value has increased from 2 to 4. When I run the job it does not update this change and you cannot add it to the values property in the change capture stage, it errors and say it cannot be both a key and a value. How do people here handle this kind of change?

TIA.

Sean
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

2 to 4 as a value? That shouldn't be a problem, irrespective of the data type of the key column, unless there's a CHECK constraint on the table.

2 to 4 digits/characters? Then, yes, your metadata have changed out there in the database. Your DataStage jobs' metadata will need to be changed to correspond.

Best practice is to re-import the table definition, re-load that column from the imported table definition. In this way the linkage between the table definition in the Repository and the jobs that use that table definition is preserved, which means that you can accurately perform Usage Analysis on those table definitions (not to mention Lineage and other analyses in MetaStage).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
seanc217
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 15, 2005 9:22 am

Post by seanc217 »

Yes,

my column's metadata changed from varchar2(2) to varchar2(4).

What about if I am trying to maintain a type 2 SCD?
I would want to expire the current records and insert the new ones.

With the change capture stage this would not happen because the column that changed is part of the change key.

The only way I could figure to handle this is to expire all the records by issuing an update and then re-loading.

Any insight is appreciated.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Have you effected the metadata change in all stages that refer to it?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
seanc217
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 15, 2005 9:22 am

Post by seanc217 »

Yes. I changed the metadata in the columns page to reflect the change. However when I run the job, it does not recognize the change since the change that was make is actually a key in the change capture stage.
samsuf2002
Premium Member
Premium Member
Posts: 397
Joined: Wed Apr 12, 2006 2:28 pm
Location: Tennesse

Post by samsuf2002 »

set the key value and also set the change mode option in change capture as Explicit keys,All values and try hope this will help u
hi sam here
Post Reply