Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to use same input with 2 record types to map to single output

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.

 

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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.

0683p000009LvlF.jpg

 

 

View solution in original post

2 Replies
cterenzi
Specialist
Specialist

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:

tFileInputMSDelimited

Anonymous
Not applicable
Author

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.

0683p000009LvlF.jpg