How to add double quotes to header into the file

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"
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 :-)

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

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 :-)

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

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 ...

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

How OTTO Utilizes Big Data to Deliver Personalized Experiences

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

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now