This is one of the requirement, need help
Code: Select all
Input data
col1|col2
M|abc
C|def
U|hji
M|ad
U|ryer
M|fntry
C|rtf
U|gsfdg
Ouput
col1|col2|col3 |col4|col5|col6
M|abc|C|def|U|hji
M|ad| | |U|ryer
M|fntry|C|rtf|U|gsfdg
Regards
Prasad
Moderators: chulett, rschirm, roy
Code: Select all
Input data
col1|col2
M|abc
C|def
U|hji
M|ad
U|ryer
M|fntry
C|rtf
U|gsfdg
Ouput
col1|col2|col3 |col4|col5|col6
M|abc|C|def|U|hji
M|ad| | |U|ryer
M|fntry|C|rtf|U|gsfdg
Code: Select all
Input data
col1|col2
M|abc
C|def
U|hji
M|ad
U|ryer
M|fntry
C|rtf
U|gsfdg
Ouput
col1|col2|col3 |col4|col5|col6
M|abc|C|def|U|hji
M|ad| | |U|ryer
M|fntry|C|rtf|U|gsfdg
[/quote]meena wrote:Hi Prasad,
If col1 values are consistent( 'M','C' & 'U').
Use the transformer stage to filter the col1 using constarints and to get three output streams.Define a common dummy column in all three outstreams with the same constant value.Next use the merge stage to merge all the three streams.
Or you can do the same using filter,modify and merge stages.
Code: Select all
Input data col1|col2 M|abc C|def U|hji M|ad U|ryer M|fntry C|rtf U|gsfdg Ouput col1|col2|col3 |col4|col5|col6 M|abc|C|def|U|hji M|ad| | |U|ryer M|fntry|C|rtf|U|gsfdg
As you can see in the sample data shown M, C and U are not consistent, there might beprasad111 wrote:meena wrote:Hi Prasad,
If col1 values are consistent( 'M','C' & 'U').
Use the transformer stage to filter the col1 using constarints and to get three output streams.Define a common dummy column in all three outstreams with the same constant value.Next use the merge stage to merge all the three streams.
Or you can do the same using filter,modify and merge stages.
Code: Select all
Input data col1|col2 M|abc C|def U|hji M|ad U|ryer M|fntry C|rtf U|gsfdg Ouput col1|col2|col3 |col4|col5|col6 M|abc|C|def|U|hji M|ad| | |U|ryer M|fntry|C|rtf|U|gsfdg
As you can see in the sample data shown M, C and U are not consistent, there might beprasad111 wrote:meena wrote:Hi Prasad,
If col1 values are consistent( 'M','C' & 'U').
Use the transformer stage to filter the col1 using constarints and to get three output streams.Define a common dummy column in all three outstreams with the same constant value.Next use the merge stage to merge all the three streams.
Or you can do the same using filter,modify and merge stages.
Code: Select all
Input data col1|col2 M|abc C|def U|hji M|ad U|ryer M|fntry C|rtf U|gsfdg Ouput col1|col2|col3 |col4|col5|col6 M|abc|C|def|U|hji M|ad| | |U|ryer M|fntry|C|rtf|U|gsfdg