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
CDC behaviour
Moderators: chulett, rschirm, roy
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.
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
"You can never have too many knives" -- Logan Nine Fingers
Re: CDC behaviour
Suresh,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
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
Why did you define all values as "excluded values" when running 2nd time.I have defined the key in CDC and all other columns from source are defined as excluded as value .
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.balajisr wrote:Why did you define all values as "excluded values" when running 2nd time.I have defined the key in CDC and all other columns from source are defined as excluded as value .
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?
- Pavan