Page 1 of 1

CDC behaviour

Posted: Sun Jul 22, 2007 9:53 am
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

Posted: Sun Jul 22, 2007 10:46 am
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.

Re: CDC behaviour

Posted: Sun Jul 22, 2007 7:06 pm
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

Posted: Sun Jul 22, 2007 10:33 pm
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?

Posted: Sun Jul 22, 2007 11:17 pm
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