Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have input with 2 record types, number of columns are different in both
| HEADER | h1b | hcc | hcd | ||
| LINE | h1lb | h1lc | h1ld | h1le | h1lf |
| HEADER | h2b | h2c | h3d | ||
| LINE | h2lb | h2lc | h2ld | h2le | h2lf |
| LINE | h2l2 | h2lc | h2ld | h2le | h2lf |
I would like the mapped output to end like
HEADER~h1b~hcc~hcd
LINE~h1lb~h1lc~h1ld~h1le~h1lf
HEADER~h2b~h2c~h3d
LINE~h2lb~h2lc~h2ld~h2le~h2lf
LINE~h2l2~h2lc~h2ld~h2le~h2lf
How can I ignore the 2 additional columns for HEADER or is there a way to use 2 different input schema from input for the same input data?
the current output is
HEADER~h1b~hcc~hcd~~
LINE~h1lb~h1lc~h1ld~h1le~h1lf
HEADER~h2b~h2c~h3d~~
LINE~h2lb~h2lc~h2ld~h2le~h2lf
LINE~h2l2~h2lc~h2ld~h2le~h2lf
Thank you in advance for any suggestion/guidance.
Thank you cterenzi. Thats helpful. However I had to use excel as input.
I was able to use 2 tMaps followed by a tFilterRow dumping to 2 tFileOutputDelimited but both use the same output file, so it dumps HEADER and LINE to same file.
There is a tFileInputMSDelimited component which can handle multiple schemas in one file. I've included a link to the component documentation which includes an example below:
Thank you cterenzi. Thats helpful. However I had to use excel as input.
I was able to use 2 tMaps followed by a tFilterRow dumping to 2 tFileOutputDelimited but both use the same output file, so it dumps HEADER and LINE to same file.