Look up on 6 fields
Posted: Fri Oct 05, 2007 10:12 pm
Hi All,
I have 2 input streams coming into my job. Both of them have different meta data.
File1 has the following meta data:
(All the 6 fields are integers)
col1
col2
col3
col4
col5
col6
File2 has the following meta data:
( both the fields are integers )
ABC
TXT
now i have to perform a look up ( or merge or join ) where the condition is:
if col1 ( from File1) equals to ABC ( from File2) then output TXT.
( if the lookup matches then I have to output TXT as col1_TXT. just to differentiate with other outputs )
if col2 ( from File1) equals to ABC ( from File2) then output TXT.
( this I have to output as col2_TXT)
if col3 ( from File1) equals to ABC ( from File2) then output TXT.
( this I have to output as col3_TXT)
if col4 ( from File1) equals to ABC ( from File2) then output TXT.
( this I have to output as col4_TXT)
if col5 ( from File1) equals to ABC ( from File2) then output TXT.
( this I have to output as col5_TXT)
if col6 ( from File1) equals to ABC ( from File2) then output TXT.
( this I have to output as col6_TXT)
can anyone please suggest me how do I do it in data stage.
Regards
Pa
I have 2 input streams coming into my job. Both of them have different meta data.
File1 has the following meta data:
(All the 6 fields are integers)
col1
col2
col3
col4
col5
col6
File2 has the following meta data:
( both the fields are integers )
ABC
TXT
now i have to perform a look up ( or merge or join ) where the condition is:
if col1 ( from File1) equals to ABC ( from File2) then output TXT.
( if the lookup matches then I have to output TXT as col1_TXT. just to differentiate with other outputs )
if col2 ( from File1) equals to ABC ( from File2) then output TXT.
( this I have to output as col2_TXT)
if col3 ( from File1) equals to ABC ( from File2) then output TXT.
( this I have to output as col3_TXT)
if col4 ( from File1) equals to ABC ( from File2) then output TXT.
( this I have to output as col4_TXT)
if col5 ( from File1) equals to ABC ( from File2) then output TXT.
( this I have to output as col5_TXT)
if col6 ( from File1) equals to ABC ( from File2) then output TXT.
( this I have to output as col6_TXT)
can anyone please suggest me how do I do it in data stage.
Regards
Pa