Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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"
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 🙂
if you put it as Data in tFixedFlowInput it will work.
"ID";"AB"
1;Abhi
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
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 🙂
Up
Anyone has a solution please ? Need to do the same.
Thanks
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 ...
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?