Appending records to a file
This simple recipe shows how a file can be built in within different sub jobs by appending data to an existing file. The append method is one way of building complex files, as will be demonstrated in later recipes in this chapter.
Getting ready
Open the jo_cook_ch08_0010_fileAppend
job.
How to do it...
The steps for appending records to a file are as follows:
- Copy the complete
subjob1 – copy me
sub job and paste it to create a second sub job. - Link the two sub jobs using an
onSubjobOK
link. - Open
tFixedFlowInput
, and changeRecords from first subjob
toRecords from second subjob
. - Open
tFileOutputDelimited
on the new sub job, and tick Append, as shown in the following screenshot:
How it works...
The first sub job creates the file, ...
Get Talend Open Studio Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.