One Star

[resolved] special characters in field names - CSV file using hyphen "-" header

Excuse the first time user question, but I have fallen at the first hurdle creating my first job.
The output CSV file needs specific header column names such as "first-name"; I cannot change this. When I define this in Talend it changes the field in the schema to "first_name" (underscore not hyphen) and i cannot seem to override or escape this.
Help.
Thanks
Si
1 ACCEPTED SOLUTION

Accepted Solutions
One Star

Re: [resolved] special characters in field names - CSV file using hyphen "-" header

OK - searching further suggests that tUnite does not guarantee the field order on the output.
Change this to be a job for the header and a sub-job activated after the header job to append the data.
Sigh.
Si
4 REPLIES
Community Manager

Re: [resolved] special characters in field names - CSV file using hyphen "-" header

Hi
Talend don't support the special characters like hyphen "-" in the column name.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] special characters in field names - CSV file using hyphen "-" header

Thanks for the quick reply,
OK but then there must be a solution?
Lets say I put the header row in another file and then combine the output rows with that row to the output file - then I get the header coloumn names I want?
Cheers
Si
One Star

Re: [resolved] special characters in field names - CSV file using hyphen "-" header

OK - Now I have tried using tUnite to combine the data with a file containing the header row (with illegal characters) and that works fine except no matter how I set the tUnite merge order it always comes out the wrong way.
Any ideas what I am doing wrong?
Cheers
Si
One Star

Re: [resolved] special characters in field names - CSV file using hyphen "-" header

OK - searching further suggests that tUnite does not guarantee the field order on the output.
Change this to be a job for the header and a sub-job activated after the header job to append the data.
Sigh.
Si