tFileInputDelimited with single text qualifier

Highlighted
One Star

tFileInputDelimited with single text qualifier

Hi,
I'm having problems with a CSV file that contains a double quote inside the a field enclosed by double quotes.
Ex:
"Data1","Data2","Data" 3"
Is there a quick and easy way to get around this issue using when using a tFileInputDelimited.
Thanks in advance.
Community Manager

Re: tFileInputDelimited with single text qualifier

Hi
Read it as a normal text file separated by ",", remove the double quote " on tMap. For example:
row1.columnName.replaceAll("\"","")
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tFileInputDelimited with single text qualifier

If I'm understanding this correctly this would remove all quotes and I want to preserve the inner quote.
Thanks
One Star

Re: tFileInputDelimited with single text qualifier

When I've had this sort of problem, I take the data delimited by the ',' replace the first ", reverse the string using a function, remove the first quote again and reverse the string again. That leaves everything else in the string intact.

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

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download