tFileInputDelimited with single text qualifier

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 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog