Create duplicate columns using Talend

Highlighted
Four Stars

Create duplicate columns using Talend

I have to generate a CSV file with duplicate columns, as required by an external partner. However when i define the output profile in the tMap that generates the output file, it does not allow me to specify a duplicate column (ie. another column with the same name). The external partner requires some of the column values duplicated since their system expects it that way.

 

How can i achieve this using TOS 6.5.1?

 

Thanks!

Highlighted
Eleven Stars

Re: Create duplicate columns using Talend

Usually it is external system which should duplicate data as per their requirement.
If you need to do , below is workaround:

Step 1 - create file with header as string e.g
“Id,name,name,amount”

Step 2- (your main job) append only data records without header

So final output will be
Id,name,name,amount
1,x,x,10.0
Regards
Abhishek KUMAR
Highlighted
Four Stars

Re: Create duplicate columns using Talend

Thanks, this worked!
Highlighted
Eleven Stars

Re: Create duplicate columns using Talend

Gr8 can you please mark topic as resolved.
Regards
Abhishek KUMAR

2019 GARTNER 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

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

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog