Logic Help

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
srini.dw
Premium Member
Premium Member
Posts: 186
Joined: Fri Aug 18, 2006 1:59 am
Location: Chennai

Logic Help

Post by srini.dw »

Hi,

Need to implement the below logic, it would of great help if you have any suggestions.

2 tables I got T1 and T2 with below values.
T1 having 10 million rows and T2 having 5 million rows.

T1 Table
C1 Column name
1
1
2
3
4
4
5
6

T2 Table
C1 Column name
1
3
6
7

Output Should be
2
4
5

Any ideas would be appreciated.

Thanks,
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

How about describing the requirements of the logic you're having trouble with in words, please? Something like: "The output should contain the rows/columns/whatever from input xxxxxz which yyyyyy to input zzzzzz" where yyyyyy is a condition such as match/don't match or maybe something more complicated?

By showing us only the input and expected output you're expecting us to guess/reverse engineer what the logic in the black box between input and output should be. If the input and output is all that you were given (whether as a job specification or an interview question), you may likely find that by trying to describe to us what you see makes the required logic clear to you.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
vishal_rastogi
Participant
Posts: 47
Joined: Thu Dec 09, 2010 4:37 am

Post by vishal_rastogi »

I think you need A-B type of record if it is so then you can use the merge stage and the reject link will conatin the A-B types of record
Vish
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Restrict it in sql. Based on your example, you want everything from T1 which is not there in T2, deduped.
Do a 'not exists' clause and run the output through remove duplicate stage.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:!: I'm firmly in agreement with James on this. I'm tired of and not going to be guessing at the answer to "questions" where all that is posted in an alleged example of the input and the desired output. :?

Lay our your requirements, people! Spell it out in words. Tell us what you've tried and what issues you've faced. I'm putting away the silver platter.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

We do some of that reverse engineering for a living. That's enough brain strain.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply