Page 1 of 1

Stage to be used

Posted: Mon Jul 02, 2007 3:47 am
by scorpion
Hi All,

I am looking for some solution,

I have 2 input data flows in my job from same table.

But in my out put i need one column is from 1st transformer and the other column is from 2nd transformer.

for ex:

EMP1---------------> Transformer1
(EMPNUMBER,
EMPNAME)

EMP2--------------->Transformer2
(EMPNUMBER,
EMPNAME)

Now in my Transformer3(output) I need EMPNUMBER from Transformer1 and EMPNAME from Transformer2.


so one column from 1st transformer and other column is from 2nd transformer.

How can I approach this?

Copy and Transformer stages will not allow more than 1input link.

which stage i can use to perform this.

Posted: Mon Jul 02, 2007 4:15 am
by ArndW
I have trouble understanding this - normally you would join (for instance in a lookup stage) on the common EMPNAME or EMPNUMBER. But you might use a funnel stage to combine the 2 streams and then combine the 2 rows in a subsequent transform stage.

Posted: Mon Jul 02, 2007 4:25 am
by scorpion
Hi Arndw,

Thanks for the reply,If go for funnel,is it possible to select one column from 1st transformer and other column is from 2nd transformer.

If so,In out put mapping window in funnel,how should i map one column from 1st trans and the other column from 2nd trans.

Please reply

Posted: Mon Jul 02, 2007 5:56 am
by ArndW
The funnel won't do that for you. But in a subsequent transform stage you can store the value from the previous row using stage variables and combine the rows there. If you explain why you need to do this (perhaps with an example) we might be able to suggest a better solution or approach.

Posted: Mon Jul 02, 2007 8:15 am
by scorpion
Thanks ArndW,

I am extracting records from 2sybase tables(ex: A,B) based on some extraction logic in user-defined query in sybase stage.

I am extracting columns from both the tables.And I am populating in to a TARGET file,after implementing some transformation logic.

Now for one of the target column i need to change the logic to poulate that.

For that perticular target column i am mapping one of the column from table A.

So I need to change the logic to populate target column like below:

SELECT

v2.column1

FROM A v1,A v2 where v2.COLUMN2 = v1.COLUMN3

(Here 'A' is the table name and v1,v2 are aliases)

This coloumn1 ,i have to map the target field.

What could be the best approach?

Posted: Mon Jul 02, 2007 8:28 am
by gbusson
hi,

the "easiest" ways :

a user defined SQL in the sybase stage.


By the way, how many rows do you have in output in each flow?

Posted: Mon Jul 02, 2007 8:29 am
by gbusson
hi,

the "easiest" ways :

a user defined SQL in the sybase stage.


By the way, how many rows do you have in output in each flow?

Posted: Mon Jul 02, 2007 8:43 am
by scorpion
Hi Thanks for the reply,

I have the input flow already in one transformer,so i am planning to implement this(user-defined qry)in a seperate flow.

i need to combine thease 2 input transformer (both has the same colflows.

and i will map the target column from 2nd transformer flow.(which will have the user defined qrys results).

so now how to combine thease 2 flows and how to map 1column from 2nd transformer and rest are from 1st trasformer.

as i posted it previously:

EMP1---------------> Transformer1
(EMPNUMBER,
EMPNAME)

EMP2--------------->Transformer2
(EMPNUMBER,
EMPNAME)

Now in my Transformer3(output) I need EMPNUMBER from Transformer1 and EMPNAME from Transformer2.


so one column from 1st transformer and other column is from 2nd transformer.


how do u suggest?