Hi,
I want to merge 4 columns from 1 sequential file and 1 column from second file.
Eg:
file1
-------
id, name, imp
1, A, 10
2,B, 20
file2
------
Date
20051231( only 1 record)
output
-------
id, name, imp, Date
1, A, 10,20051231
2,B, 20,20051231
1
I tried link collector but both files should have the same # of columns.
I tried merge stage but I dont have a common key in both files.
Please suggest.
Thanks in advance
Shailendra
Merge columns from 2 seq. files with different metadata.
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 40
- Joined: Tue Nov 15, 2005 11:53 pm
Is there any specific reason you need to use Merge stage. If it is just one value you can store it in a hash file and do a lookup. Or you can write your date value to a sequential file and before running this job read the sequential file and pass the value as parameter
Regards
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
-
- Participant
- Posts: 8
- Joined: Sat Jun 25, 2005 8:03 am
- Location: bangalore
Re: Merge columns from 2 seq. files with different metadata.
HIShailendra wrote:Hi,
I want to merge 4 columns from 1 sequential file and 1 column from second file.
Eg:
file1
-------
id, name, imp
1, A, 10
2,B, 20
file2
------
Date
20051231( only 1 record)
output
-------
id, name, imp, Date
1, A, 10,20051231
2,B, 20,20051231
1
I tried link collector but both files should have the same # of columns.
I tried merge stage but I dont have a common key in both files.
Please suggest.
Thanks in advance
Shailendra
if that date is the only value to be merged with then you can directly create the column and assign the value in the transformer stage .No need to merge also...
or you can create one "dummy" column in output columns of both the input stages and give a default value of 1 to both...then you can merge both the seq files based on this dummy column.
hope this will work...
-
- Participant
- Posts: 40
- Joined: Tue Nov 15, 2005 11:53 pm