merging two files with different metadata
Moderators: chulett, rschirm, roy
merging two files with different metadata
Hi,
Is it possible in Datastage to merge files with different metadata having common key columns?
Thanks
Vinod
Is it possible in Datastage to merge files with different metadata having common key columns?
Thanks
Vinod
Re: merging two files with different metadata
Use Merge stage.vinodhraj wrote:Hi,
Is it possible in Datastage to merge files with different metadata having common key columns?
Thanks
Vinod
Either you can use merger or lookup based on the volume of data. Since your concertn is on metadata, I guess you are on Concatination, if so just use cat file1 file2 > new filename command in any of the unix command execution option, like Execute command activity or Before/After job subroutine.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
why you do that
cat two file. but why you do that? how do you deal with a file with two parts of different meta data?
Thanks.
I am working with datastage server jobs, I can't use merge stage in server since I have to mention different key name for the same column.
Is it possible in unix ?
Somehow I have done this using Set Operators in SQL..
I didn't prefer lookup becoz, there is no relation between these tables though the column name were same.
Moreover SET Operators were better in performance wise.
Thanks
Vinod
I am working with datastage server jobs, I can't use merge stage in server since I have to mention different key name for the same column.
Is it possible in unix ?
Somehow I have done this using Set Operators in SQL..
I didn't prefer lookup becoz, there is no relation between these tables though the column name were same.
Moreover SET Operators were better in performance wise.
Thanks
Vinod
Kumar,
Using Union we can do this i.e if the column name is similar.
Since I am joining with differnent metadata, which ever metadata is mismatching, I will mention them as empty string providing common alias name.
for eg:
table a
name
deptno
sal
table b
name
deptname
select name, deptno,to_char(sal),'' deptname from table a
union all
select name, '' deptno,'' sal,deptname from table b
hope it helps
Vinod
Using Union we can do this i.e if the column name is similar.
Since I am joining with differnent metadata, which ever metadata is mismatching, I will mention them as empty string providing common alias name.
for eg:
table a
name
deptno
sal
table b
name
deptname
select name, deptno,to_char(sal),'' deptname from table a
union all
select name, '' deptno,'' sal,deptname from table b
hope it helps
Vinod
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
This is not correct. The column names (when working with sequential files) are totally irrelevant. Adjust the metadata so that you do have a common key column name.vinodhraj wrote:I am working with datastage server jobs, I can't use merge stage in server since I have to mention different key name for the same column.
Vinod
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: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: