Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi community,
have been working with talend for a couple of weeks now and found here important information.
Now I have a problem where I can´t find a solution for it.
I have a folder with several files ( ~2000). The goal is to get an delimited file with two column.
In column A should be the name of the file without the file extension and in column B should be the whole content of the file.
The files have different content:
The content should be as one line in the column field.
Here a short example.
File A:
Name_of_file_A.txt
Content:
Good morning,
this is a test file.
thx
Tester
File B:
Name_of_file_B.txt
Content:
Only one line as content!
Result delimited file:
Content:
Name_of_file_A; Good morning, this is a test file. thx Tester
Name_of_file_B; Only one line as content!
I tried it with tFileList --> tFileInputFullRow --> tMap --> tFileOutputDelimited, but I got only the last file into it.
How can I go to get my wanted result?
Best regards
KarMin
Check the 'Append' box on tFileOutputDelimited, otherwise, the job will create a new file for each iteration.
Great, this fix one of my problem.
Now I have still the main problem, that for all files with more than one line of content,
in the target file one row per content line will be created.
As for my example, for file A following entries will be created:
Name_of_file_A; Good morning,
Name_of_file_A; this is a test file.
Name_of_file_A; thx
Name_of_file_A; Tester
but in the end it should be:
Name_of_file_A; Good morning, this is a test file. thx Tester
How can this be reached?