Page 1 of 1

Inner Join in ServerEdition

Posted: Thu Oct 25, 2007 10:13 am
by kondeti
Hi

How we can implement the inner join in the ServerEdition. I got a business requirement as a Sql Query. I implemented the same query in the DS ServerEdition by using 2 DRS stages as source and one Transformer. I joined single column in the Transformer, Based on the join i derived some columns from Stream Link and Some columns from Reference Link.

Job is completed but i got a different output.

From the Reference Link I am getting 6000 Records from the Stream Link I am getting 45000 Records after performing join operation it's producing 45000. That output is not matching with the SQL Query which i run in the database. I understand my is performing LeftOuter join.
How can I Achieve inner join operation by using Transformer.

Thanks

Re: Inner Join in ServerEdition

Posted: Thu Oct 25, 2007 12:25 pm
by kris
Not sure why you want to perform this type of join, but if it is a simple join that you need, you can do this join in the database by running the join query in the DRS stage and selecting all the columns you need.

Anyways, join in a transformer with a streamlink and a reference link without any constraints will produce LeftOuter(Default) join.

You need constraint in the transformer to make it inner(equi) join.
In the transformer, after matching your key columns which you want to join on, in the Constraint box, right click and you will see link variables.

constraint

Code: Select all

NOT(referencelink.NOTFOUND)
will give you the innder join.

Re: Inner Join in ServerEdition

Posted: Thu Oct 25, 2007 12:26 pm
by kris
Not sure why you want to perform this type of join, but if it is a simple join that you need, you can do this join in the database by running the join query in the DRS stage and selecting all the columns you need.

Anyways, join in a transformer with a streamlink and a reference link without any constraints will produce LeftOuter(Default) join.

You need constraint in the transformer to make it inner(equi) join.
In the transformer, after matching your key columns which you want to join on, in the Constraint box, right click and you will see link variables.

constraint

Code: Select all

NOT(referencelink.NOTFOUND)
will give you the innder join.

Posted: Thu Oct 25, 2007 1:13 pm
by chulett
kondeti - that's not a "workaround", that is the answer. Constrain your output to only the lookup rows that succeeded = inner join.

Posted: Thu Oct 25, 2007 1:42 pm
by kondeti
Thank You.

Thanks

Posted: Thu Oct 25, 2007 1:44 pm
by kondeti
Thank You.

Thanks