CSV Files updating

Four Stars

CSV Files updating

I need to insert an equal header line with the data fields names on top of various CSV files that only have data records and are inside a windows directory.

I think I may have the solution of the job design for the insertion of the header in a single CSV file, but I am very confused with which Talend components I need to pick and how to aply them to update all of the CSV files inside the directory.

Can someone help me please?

Sixteen Stars TRF
Sixteen Stars

Re: CSV Files updating

tFileList-->tFileInputFileDelimited-->tFileOutputFileDelimited

That's for the flow design. As soon as the header field names are compatibles with Java naming rules you just have to define the shema with the names you want and tick the option "header line" for the output. If names are not compatible you need to merge a template file with each input files or to force a specific line un the output before starting to push records from the input file. This may be done with tFixedFlowInput.

TRF
Four Stars

Re: CSV Files updating

I tried your solution with the data file as the input file and the output file with the header already filled but it not works, also named the files as "a", "b" and "c", the iteration run 3 times but afterwards does not happen anything. 

 

Screenshot 2019-07-01 16.22.25.png

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog