CDC behaviour

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
snt_ds
Premium Member
Premium Member
Posts: 280
Joined: Wed Oct 18, 2006 11:53 am
Location: Pune, India

CDC behaviour

Post by snt_ds »

Hi,

In one of my job I'm using CDC, I have to src links (hash partitioned and sorted ASC on my key).
In CDC stage I'm using change mode as Explicit Keys, All Values
I have run the initial run where my target has 0 records; all records got inserted.
I got the change record in my source, there is a change in non key column.

I have defined the key in CDC and all other columns from source are defined as excluded as value .
I have ran the job 2nd time to get the change record.
I was expecting that Ijob will close the old record with end_dt and insert a new record with current values in my target but CDC is not giving the change record.

Am I doing some thing wrong?
Please suggest.
Thanks
Suresh
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:!: I don't have an answer for you, but please delete the two extra posts on this subject you put in the Server forum before someone replies to them.

If you don't know how, simply click the 'Edit/Delete this post' link inside of each and rather than change anything, check the 'Delete' option at the bottom before clicking Submit.
-craig

"You can never have too many knives" -- Logan Nine Fingers
pbatchu
Charter Member
Charter Member
Posts: 20
Joined: Thu Aug 17, 2006 11:53 am
Location: Boise

Re: CDC behaviour

Post by pbatchu »

snt_ds wrote:Hi,

In one of my job I'm using CDC, I have to src links (hash partitioned and sorted ASC on my key).
In CDC stage I'm using change mode as Explicit Keys, All Values
I have run the initial run where my target has 0 records; all records got inserted.
I got the change record in my source, there is a change in non key column.

I have defined the key in CDC and all other columns from source are defined as excluded as value .
I have ran the job 2nd time to get the change record.
I was expecting that Ijob will close the old record with end_dt and insert a new record with current values in my target but CDC is not giving the change record.

Am I doing some thing wrong?
Please suggest.
Thanks
Suresh
Suresh,
Check the following.

1. Partition. Like before and after records are going through same partition.

2. Data types are same.

3. If you comapare flat file record with db record, the behaviour is different. Especially, Oracle.

For Oracle '' is null but for flat file '' is blank character.

As you said, end_dt is not set automatically. Based on the change code from chage capture stage, you have to build the logic.


- Pavan
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

I have defined the key in CDC and all other columns from source are defined as excluded as value .
Why did you define all values as "excluded values" when running 2nd time.

Set Change mode as "Explicit Keys, All Values". This should work.

"excluded value" will exclude the column from comparison. How do you detect changes for the column when you are excluding it?
pbatchu
Charter Member
Charter Member
Posts: 20
Joined: Thu Aug 17, 2006 11:53 am
Location: Boise

Post by pbatchu »

balajisr wrote:
I have defined the key in CDC and all other columns from source are defined as excluded as value .
Why did you define all values as "excluded values" when running 2nd time.

Set Change mode as "Explicit Keys, All Values". This should work.

"excluded value" will exclude the column from comparison. How do you detect changes for the column when you are excluding it?
Balajisr is correct. If you do not include any value columns in change capture stage, it only detects inserts and deletes. At least one value column is required to detect update in the record.

- Pavan
Post Reply