Merge data from multiple tMap components

Seven Stars

Merge data from multiple tMap components

Hi all,

 

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

PFA

 

Thanks


Accepted Solutions
Moderator

Re: Merge data from multiple tMap components

Hi,

Please take a look at this post:https://community.talend.com/t5/Troubleshooting-Development/Can-I-create-a-Job-with-multiple-paths-f....

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

All Replies
Ten Stars

Re: Merge data from multiple tMap components

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.
Forteen Stars TRF
Forteen Stars

Re: Merge data from multiple tMap components

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.

TRF
Highlighted
Seven Stars

Re: Merge data from multiple tMap components

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
Seven Stars

Re: Merge data from multiple tMap components

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
Moderator

Re: Merge data from multiple tMap components

Hi,

Please take a look at this post:https://community.talend.com/t5/Troubleshooting-Development/Can-I-create-a-Job-with-multiple-paths-f....

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Upsert Logic for flat files

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

 

Four Stars

Upsert Logic for flat files

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

 

Seven Stars

Re: Upsert Logic for flat files

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