CDC Stage

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
kab123
Participant
Posts: 92
Joined: Tue May 18, 2004 4:05 pm

CDC Stage

Post by kab123 »

Hi,

I am trying to compare history file to current file using CDC stage...
The jobs runs fine and could do CDC correctly..but i get some warnings on the other columns which are not keys..and change values
Warning: "CDC: When checking operator: Defaulting "P_PHONE" in transfer from "beforeRec" to "outputRec".

any clue what needs to be done..

Thanks in advance...
kab123
Participant
Posts: 92
Joined: Tue May 18, 2004 4:05 pm

Post by kab123 »

I guess there are not many people using CDC stage... :(
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Kab123,

there are a few who use CDC. Yours would be the first post that I see where no answer at all is forthcoming.

I get the same warning for all columns that are neither key nor used for CDC and think that this is just the way that things work, I can only get use a handler to demote the message to informational.
kab123
Participant
Posts: 92
Joined: Tue May 18, 2004 4:05 pm

Post by kab123 »

exactly..I supressed this message using message handler in dev ...
but this message handler I dont think will get migrated as well with code to production and I dont even have access to add that rule...I dont want to confuse them about this warning..so I thought I would get some suggestions from the forum...
looks like I have to follow the same in PROD too :oops:
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You could submit this to IBM/Ascential support and see if there is an alternative. We'd be curious to hear what the response it.
ameyvaidya
Charter Member
Charter Member
Posts: 166
Joined: Wed Mar 16, 2005 6:52 am
Location: Mumbai, India

Post by ameyvaidya »

Hi Kab123,
I think this is why one gets a warning when running CDC with columns other than:keys and values:

* The Target dataset is constructed with columns that are a union of the before and after columns in the dataset. Now there may be columns ini the after dataset that are not present in the Before dataset. There may also be non-key and non-value columns with the same name in both before and after datasets.

What happens in this scenario is that, When the CDC stage marks a row as deleted, the target dataset is populated with the before row.

1. Now columns exclusively present in the after row (which are a part of the union of the two) do not have corresponding before values. These are defaulted to the proper value for the data type of the column(null for nullable; "" for String, 0 for numerics) Hence the "Defaulting" type of warnings.

2. When a non-key and non-value column that is present in both the before and after datasets is encountered, the Before value is considered(row is deleted), the after value cannot be mapped to any target column and there is no way RCP can pass the column forward coz a column with the same name has already been mapped. So the "After" column is dropped. Hence the "Dropping" type of warnings.

Resolution:
Do not pass any non-key or non-value columns to the CDC. instead, use something like this:

Code: Select all

After------> Copy-------------------------->Join---|
                |        (Insert,Change,Copy)|     |->
                |                    |--------
                ---->CDC----->Switch--                Funnel--->
                |                    |--------
                |                  (Delete)   |    |-> 
Before-----> Copy-------------------------->Join---|


It sucks and destroys all performance but there are no warnings.

IHTH
Amey Vaidya<i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

I would just ignore the warning and handle it is the message handler. Much easier then trying to split and merge the record down two paths. These warnings happen even if there is no defaulting going on. For example if you drop deletes you still get these warnings, even though the rows with defaulting values are not being written out. Also happens if no deletes are found. So it is largely meaningless unless you have designed your job poorly and try to send delete records down an update or insert path without realising they are there.

To migrate a message handler just copy the file from the MsgHandlers directory in the DataStage home folder to the target server. The details are stored in text files with an msh extension.
jamshid_kunhalu
Participant
Posts: 5
Joined: Wed Aug 31, 2005 9:19 pm
Location: Mumbai
Contact:

Post by jamshid_kunhalu »

hi Kab

Even i faced some what similar problem...what i did is In CDC properties option

i changed Change Mode= Explicit Keys and All Values

before it was

Change Mode= Explicit Keys & Values..

it worked fine for me...i didnt need to handle the warnings after that....


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

Post by ray.wurlod »

kab123 wrote:I guess there are not many people using CDC stage... :(
Some of us sleep at night, or take the occasional weekend off! The downside is that now I've got nothing to add to what's already been posted on this thread!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

ray.wurlod wrote:The downside is that now I've got nothing to add to what's already been posted on this thread!
Other than the fact that you've got nothing to add, that is. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
kab123
Participant
Posts: 92
Joined: Tue May 18, 2004 4:05 pm

Post by kab123 »

Thank you all for ur suggestions..
From the opinions above, I feel that message handler is the best option to stick too..
Post Reply