How to add double quotes to header into the file

Highlighted
Eight Stars

How to add double quotes to header into the file

 

I used below to write header into the file . But I want to include doubles to each column like as below 

 

tFixedFlowInput -->tOutputFileDelimited

Expected output 

"ID"|"Name"|"City"
Highlighted
Employee

Re: How to add double quotes to header into the file

Hi,

 

    You will not be able to add header with double quotes using tFileOutputDelimited component.

 

     May I know the rationale to add double quotes for the header record?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

Highlighted
Eleven Stars

Re: How to add double quotes to header into the file

if you put it as Data in tFixedFlowInput it will work.

 

"ID";"AB"

1;Abhi

Regards
Abhishek KUMAR
Highlighted
Eight Stars

Re: How to add double quotes to header into the file

Hello,

 

In tFileOutputDelimited in Advanced Settings, there is a checkbox CSV options.

 

If you check it, you will have double quotes enclosed in the fields.

 

Thanks,

Subhadip

Highlighted
Employee

Re: How to add double quotes to header into the file

@subhadip13 

 

The solution you are proposing will not work in case he need to capture the column names also within double quotes.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

Highlighted
Six Stars

Re: How to add double quotes to header into the file

Up

 

Anyone has a solution please ? Need to do the same.

 

Thanks

Highlighted
Four Stars

Re: How to add double quotes to header into the file

 you have to export header as data instead.

You could union headers from DUAL table like this:

 

select 'columnaHeader1', 'columnHeader2', 'columnHeader3' from DUALunion all select ...

Highlighted
Five Stars

Re: How to add double quotes to header into the file

There should be two flows.

 

1. TFixedFLowInput --> TfileOutputDelimited

 

TFixedFLowInput pass the Headers as Data values.

TfileOutputDelimited -- uncheck the "Include Header "option

 

Here you will get the data with double quotes which is actually your Headers.

 

2. Normal data flow --> TfileOutputDelimited(same file name as above)

Don't include header and give append option.

so your data will be loaded from second line.

 

Is this what you are looking for?

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

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

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog