Page 1 of 1

Logic Help

Posted: Thu Jun 30, 2011 5:42 am
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,

Posted: Thu Jun 30, 2011 6:01 am
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,

Posted: Thu Jun 30, 2011 6:04 am
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

Posted: Thu Jun 30, 2011 7:28 am
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.

Posted: Thu Jun 30, 2011 7:33 am
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.

Posted: Thu Jun 30, 2011 4:34 pm
by ray.wurlod
We do some of that reverse engineering for a living. That's enough brain strain.