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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
vidya821
Creator
Creator

Merge data from multiple tMap components

Hi all,

 

How can i merge the data from multiple tMap components into single output file

PFA

 

Thanks

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

8 Replies
cterenzi
Specialist
Specialist

You can connect each filter to its own file output component, and configure the output components to reference the same file name. Check the "Append" box to make them all add to the file rather than overwrite it.
TRF
Champion II
Champion II

Depending on what you need to do after this step, you can also use tHashOutput to result from all the tMap in memory and reuse it later using tHashInput. This suppose the schema is the same for each output tMap, else you need to reconciliate first.
vidya821
Creator
Creator
Author

Thanks, i was able to manage it with tMap since schema was same for all outputs , using join in the different tMaps helped me to achieve the desired output
vidya821
Creator
Creator
Author

Thanks, i was able to manage it with tMap since schema was same for all outputs , using join in the different tMaps helped me to achieve the desired output without using filters
Anonymous
Not applicable

Anonymous
Not applicable

Hi,

I want to conduct an upsert logic for a flat file, i.e consider a StudentList which consists of Id, Name. Once, the data is inserted, next time, only a delta file would be provided which would consist of new rows, and rows with updates. Please note, there is no database involved. ONLY flat files. Should I implement this?

I tried creating a Tmap as given in the screenshot, and sent both the outputs NewRecord and UpdatedRow to different tFileOutputDelimited referencing the same output file but, it gets replaced, hence, not implementing the UPSERT logic.

 

Regards,

Princy

 


Tmap.JPG
Anonymous
Not applicable

Hi,

I want to conduct an upsert logic for a flat file, i.e consider a StudentList which consists of Id, Name. Once, the data is inserted, next time, only a delta file would be provided which would consist of new rows, and rows with updates. Please note, there is no database involved. ONLY flat files. Should I implement this?

I tried creating a Tmap as given in the screenshot, and sent both the outputs NewRecord and UpdatedRow to different tFileOutputDelimited referencing the same output file but, it gets replaced, hence, not implementing the UPSERT logic.

 

Regards,

Princy

 


Tmap.JPG
Tmap.JPG
vidya821
Creator
Creator
Author

Better approach would be
1) Read the flat file as a single file row instead of columns (The Tmap will compare the complete row data with lookup file row data and it would give you the difference data)
2) Use only one output with the tmap settings of Catch lokup inner join reject as true (Thus the new records and the updated records would be sent as output)

Thanks


Tmap_settings.png