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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] how to merge two files and get one output

i have this sinple job of transfering a data from csv to db table.
all i want is to check the rejected records and merge them into one file.
the tfileinputdelimited will reject some data due to schema validation.
and the touputmssql will also reject some records due to constraints.
all i want is to merge the rejected records in one single file.
i tried tfilelist-didnt work,
tcreatetemporaryfile too..didnt got the expected result.
help me in this matter, plz find the attached screenshot of my job for better undrstanding of the problem
thnks in advance
0683p000009MEQL.jpg
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi
You can use tHashOutput component to cache the record in memory, instead of file with tFileOutputDelimited component, and use tHashInput to read the data from memory back again in the next subjob, use a tUnite to merge the two data flow and output the result to a file in the next subjob.
Shong

View solution in original post

13 Replies
_AnonymousUser
Specialist III
Specialist III

hi- hey even i have the same doubt.
waiting for experts to reply-------
Anonymous
Not applicable
Author

You can use outputdelimited and recall this file in the same job.
Anonymous
Not applicable
Author

Hi
Please take a look at this KB article, it explains the problem and provides solutions.
https://community.talend.com/t5/Design-and-Development/Can-I-create-a-Job-with-multiple-paths-from-a...
Shong

_AnonymousUser
Specialist III
Specialist III

hi shong-
thanks for reply-
but what i want to do is merge records ie. row.
and tmap will work on columns.
i have two csv files being created in the same job will same schema.
now suppose file1.csv has 10 records, and file2.csv has 5 records.
then i want to have a file3.csv with 15 records as the ouput(is addition of file1 records and file2 records)
note: i dnt want the file1.csv and file2.csv to be saved anywhere.
Anonymous
Not applicable
Author

Hi
You can use tHashOutput component to cache the record in memory, instead of file with tFileOutputDelimited component, and use tHashInput to read the data from memory back again in the next subjob, use a tUnite to merge the two data flow and output the result to a file in the next subjob.
Shong
_AnonymousUser
Specialist III
Specialist III

hi shong-
i m unable to find/search for the component "tHashoutput".
i guess it is because i am using a freely available version of talend studio.- m i correct??
can u help with with an altrnative solution of merging two files??
thnkx in advance..
Anonymous
Not applicable
Author

Hi
The tHashInput/tHashOutput are also available in community version, they might have been hidden, go to the Project settings, then Designer, Palette, move them from the Hide side to Show side.
Shong
0683p000009MEi3.png
_AnonymousUser
Specialist III
Specialist III

thank u so much shong--
this really helped me--
Regards,
Roni V.
Anonymous
Not applicable
Author

 

 

please let me know how did u do it..? I am facing the same issue. 

 

0683p000009LwLx.pngHi, Can you