Transformer stage - constraint

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
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

Transformer stage - constraint

Post by vij »

Hi,

I have a job in which i read a source file which has about 100 records and this is passed to a transformer.in the transformer, based on the i/p column value the row has to be moved to the appropriate datasets.

In the above job, i give two constraints on the transformer stage, if i/p column =a, dataset1 and if i/p column =b, dataset2.

the problem is, when a new value for this input column is coming in, for eg., c, then the source is not reading that value at all. wheres the prblm?

the job structure is :

source -> transformer -> target

Thanks
thebird
Participant
Posts: 254
Joined: Thu Jan 06, 2005 12:11 am
Location: India
Contact:

Post by thebird »

Can you be a little specific on the issue.

As per the constraint that you've given -
i/p column =a, dataset1 and if , i/p column =b, dataset2
Dataset1 will be populated by only those rows where the i/p column =a, and dataset 2 by those where i/p column =b. So there seems to be nothing wrong with the way the job is behaving.
So, if a new value 'c' comes in, it would not go to either dataset1 nor dataset2.

Now if you can also state your requirement clearly, then may be soembody here can help after understanding the issue.
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post by I_Server_Whale »

The job is behaving correctly according to the constraints defined.

If you want 'c' to go into the output links as well.

Then, you can modify your constraints as:

Code: Select all


i/p column <> b, dataset1

i/p column <> a, dataset2

Whale.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

Post by vij »

thanks for ur reply. i understnd that a new i/p column value will be outputted only if the constraint is specified for that.
my doubt is, if there is some new i/p column value coming in , for eg., V for some 20 records, will datastage read those records are not.

my concern is - in any case, the datastage should read all the records from a file that is defined as a source rite?

pls validate my understanding.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Of course it will always read all of the records, or at least attempt to based on your metadata. They will then 'come into' the Transformer stage but because of the constraint will not.. 'leave'.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply