Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Lookup on multiple columns

Hi

I'm hoping someone can help.  

I have 3 columns in a mySQL input and need to make sure I only process those records I haven't seen before. 

My target database table contains the same 3 columns plus an integer id column and the table has a unique index on these 3 columns.  

I have pulled database table into the job as a lookup and am about to join the 3 input columns to their matching column in the lookup.  Where no match occurs and my id field is 0 then I can move forward with the record for processing through to the database table.

 

 

My concern is that I'm sure I've read somewhere that this isn't the best approach so wanted to reach out to the community to get some thoughts on how I should approach it.

Thanks

Dave

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Dave,

You can do this many ways. one easy approach is to use tMap and use Inner join. join all the 3 columns. In the output table, go to tMap settings and choose "catch lookup inner join reject" as true.  This approach would work perfectly fine for 2 table join.

 

In case of more than 3 table joins, use the conventional left outer join and select the id column from right table and check for null.

 

Regards,

Ragu

View solution in original post

2 Replies
Anonymous
Not applicable
Author

Dave,

You can do this many ways. one easy approach is to use tMap and use Inner join. join all the 3 columns. In the output table, go to tMap settings and choose "catch lookup inner join reject" as true.  This approach would work perfectly fine for 2 table join.

 

In case of more than 3 table joins, use the conventional left outer join and select the id column from right table and check for null.

 

Regards,

Ragu

Anonymous
Not applicable
Author

Ragu

Thanks - this worked a treat!

 

Thanks

Dave