hi all,
I need to join two files, file1 contain col1 and file2 contain col2, i need an output in such a way that the output file should contain col1 | col2 seperately but in a one file.
Join Files which is not having key column
Moderators: chulett, rschirm, roy
Join Files which is not having key column
regards,
Rakesh
Rakesh
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Use Column Generator stages to create a sequential key column on each input. Feed those into a Join stage. Direct the output of that into a two-column text file.
Last edited by ray.wurlod on Tue Feb 12, 2008 2:47 am, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 334
- Joined: Fri Dec 01, 2006 5:17 am
- Location: Texas
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
dummy column may lead to cross productAmeyJoshi14 wrote: You can use dummy column to join the two files.....
Add this column in both the file..say the name of the column is colX with value as '1'. Us join stage which will join the records based on this dummy column..
its better to use Ray's suggestion if number of records are more than 1
.
or pass the row number from transformer and join on row number
Regards,
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.