Hi All,
Is it possible to compare two records in DataStage, then decide what value to add to a new field on each record?
For example, if Record 1 has an 'A' and Record 2 has a 'B' then, add a new field with 'Z' for Record 1 and 'Y' for Record 2. But, if Record 1 has an 'A' and Record 2 has a 'C', the new values would be different. Hopefully that makes a little sense
Any idea please share...
compare two records in DataStage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 134
- Joined: Tue Jun 15, 2010 2:10 am
- Location: Bangalore
Please put the values in tabular format so that it will be easy for you to pose your question..
Last edited by srinivas.nettalam on Thu Feb 14, 2013 3:39 am, edited 1 time in total.
N.Srinivas
India.
India.
Re: compare two records in DataStage
can be use Aggregator stage for that or compare the two records using join or merge stage after that use aggregater stage
mgplk
-
- Participant
- Posts: 134
- Joined: Tue Jun 15, 2010 2:10 am
- Location: Bangalore
Re: compare two records in DataStage
Apparently,there are no common values expected in the two sets so we cannot porceed with the combining stages.However you can try compare stage but even that stage requires same values in the columns as per my understading123gopal wrote:can be use Aggregator stage for that or compare the two records using join or merge stage after that use aggregater stage
N.Srinivas
India.
India.
-
- Participant
- Posts: 3593
- Joined: Thu Jan 23, 2003 5:25 pm
- Location: Australia, Melbourne
- Contact:
You might be able to do something with a Transformer loop - this lets you step through the values of records across more than one row and output rows based on what you find. This Transformer looping functionality was new in version 8.5 (I think) and is in every version since. You would need to partitioning and sorting to make sure row A and B come into the transformer in a row.
Certus Solutions
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn
Blog: Tooling Around in the InfoSphere
Twitter: @vmcburney
LinkedIn:Vincent McBurney LinkedIn