FileInputDelimited not removing quotes

FileInputDelimited not removing quotes

Hi,
I've got some csv files which I want to import to a database. The files look like this :
"2012-09-05 13:31:36", "0bbc03e800000000000000000000058d08de", "0bbc03eb0000000000000000000000154026", "0bbc03ee00000000000000000000007a09e3", "", "0bbc03ea000000000000000000000000e1e9", "open", "", "", "", ""
(This is a single line)
After reading the file, double quotes remain surrounding each field. I've tried several configurations for the FileInputDelimited component with no success. Also tried specifying the Field Separator as: ", " but no luck. Currently, the configuration for the component is:
Row separator: CRLF("\r\n")
Field Separator: ", "
Escape char: "\""
Text enclosure: "\""
I've made a test with a one line file where I've removed the whitespaces after each comma and specifying Field Separator as "," and it has worked, but removing the whitespaces by hand is no way.
My Talend DI version is 5.2.2.
Please, could you help me with this?.
KR
Juan Carlos González
Moderator

Re: FileInputDelimited not removing quotes

Hi,
What's your expected result? It looks like
2012-09-05 13:31:36 0bbc03e800000000000000000000058d08de 0bbc03eb0000000000000000000000154026
0bbc03ee00000000000000000000007a09e3 0bbc03ea000000000000000000000000e1e9 open ?
How about setting the Field Separator as "Space" (see my pic)
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

Re: FileInputDelimited not removing quotes

Hi Sabrina.
First of all, excuse me for this delay in my answer. Yesterday I was out of the office and couldn't test your suggestion.
I've used your configuration and works properly. However, I don't understand it. Why are we using the space char as the separation char when the file contains two characters (comma + space) between fields?. Please could you explain this behaviour?.
Thank you very much for your help.
KR
Juan Carlos González
Moderator

Re: FileInputDelimited not removing quotes

Hi,
Because there is spaces in your source file so set the "Field separator" as space to read it. When the component meet a space, it will separate the column.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

Re: FileInputDelimited not removing quotes

Hi Sabrina.
Thanks for your quick answer.
So, the comma character is ignored?.
KR
Juan Carlos González
Seven Stars

Re: FileInputDelimited not removing quotes

I agree that the behaviour does not seem ideal but effectively the commas are ignored because they are outside the quotes that Talend is treating as the text enclosures.