You are not logged in.
Announcement
Unanswered posts
|
Pages: 1
I have one file contains multiple columns for a table and the second file contains the rest of the columns. I would like to concatenate the columns in the first file with the columns of the corresponding rows in the second file. I do not have a key to join them for each row. Can this be done with TOS? How? If not, are there any other ways to do it?
Thanks.
Offline
Hi
It can be finished with tMap component. Please download the user guide documentation and learn more.
Feel free to post your questions!
Best regards
shong
Offline
sea2sky wrote:
I do not have a key to join them for each row.
So you mean, file1 row1 corresponds to file2 row1 and so on? I'm sorry, tMap can't do this (and TOS can't do this in a more general way). I suggest you to create a feature request in the bugtracker.
Offline

Hi sea2sky,
This can be done using 2 tMap components together with the sequence() function to generate unique (but sequential) keys for each data flow. This will provide you with an additional column representing the line number of each row. In another tMap, join the sequences (line numbers) together and voila! Make sure you choose two different sequences (s1 and s2)
alpha.txt
a
b
c
num.txt
1
2
3
Starting job merge at 16:38 09/01/2008.
a1
b2
c3
Job merge ended at 16:38 09/01/2008. [exit code=0]
Cheers,
c0utta
Last edited by c0utta (2008-01-09 07:41:25)
Offline
Excellent c0utta, that's a smart workaround. Would you like to write a use case on this subject? (as what you can find on [wiki] use cases)
Offline
Pages: 1