Page 1 of 1
Merge or Logical Thinking
Posted: Tue Dec 08, 2015 6:54 am
by karthi_gana
All,
I am working on the below requirement.
Table Structure:
Market Model Industry Registration
File 1:
Market Model Ind
MK1 M1 5
MK2 M2 15
File 2:
Market Model Reg
MK1 M1 50
MK2 M2 150
I have to merge tthese 2 files and store it in the above table.
I have tried merge and just got 0 in the Industry column.
Expected Output:
MK1 M1 5 50
MK2 M2 15 150
is Merge stage is the right option for this?
Inputs are welcome!
Posted: Tue Dec 08, 2015 7:39 am
by chulett
Looks more like a join to me.
Posted: Tue Dec 08, 2015 10:09 am
by karthi_gana
Sorry...the file is in the below format.
Market Model Ind Reg
MK1 M1 5 0
MK2 M2 15 0
MK1 M1 0 50
MK2 M2 0 150
Posted: Tue Dec 08, 2015 10:25 am
by chulett
That is a completely different scenario than your original post.
Posted: Tue Dec 08, 2015 11:12 am
by karthi_gana
yes.. But this is what my requirement...
Posted: Tue Dec 08, 2015 11:15 am
by karthi_gana
Actually we receive 2 files as I said in my first post...But the transpose logic will transpose the file (including some other logics) and give the result which I mentioned in my second post...
Posted: Tue Dec 08, 2015 5:31 pm
by ray.wurlod
It's still a join. Between source and join generate a column that identifies the source. Perform the join. Downstream of the join use a Transformer stage to generate two output links, and bring those together using a Funnel stage.
Posted: Tue Dec 08, 2015 8:52 pm
by karthi_gana
ray.wurlod wrote: Between source and join generate a column that identifies the source.
I am not clear on this point. Can you explain little bit more?
Posted: Wed Dec 09, 2015 5:14 am
by ray.wurlod
Generate a constant that identifies one source as "A" and the other as "B". This will be used downstream to indicate which output column to populate in the Transformer stage.
A Column Generator stage would be ideal for this purpose.