Problem with using tFileInputDelimited for csv file

Highlighted
Seven Stars

Problem with using tFileInputDelimited for csv file

Hi,

 

I'm using TDI open studio where I'm trying to read csv file from local machine using tFileInputDelimited. 

Below is the screenshot of the csv :

Screen Shot 2017-06-12 at 5.07.08 PM.png

 

In properties of tFileInputDelimited:

 

Screen Shot 2017-06-12 at 5.21.53 PM.png

 

Output for field separator = ";"

 

Screen Shot 2017-06-12 at 5.23.00 PM.png

 

Output for field separator = ","

Screen Shot 2017-06-12 at 5.23.28 PM.png

 

2 Problems:

1.Why each value is enclosed in double quote (")

2. Field separator = "," just working fine, but what in case of value like "Fife, WA" in column NAME ?

 

So, what could be done in order to read data from csv file in an efficient way ?

Thanks !

 

 

 

 

 

 

 

 

 

 

 

 


Accepted Solutions
Highlighted
Sixteen Stars
Sixteen Stars

Re: Problem with using tFileInputDelimited

Field separator must not appear in the content, that's the problem you have, field separator is "," and it appears in content (LWNAME = fife,WA).

You must change the separator in the source file, or enclose field values between quotation marks ("fife,WA") and tick "CSV options" field.


TRF

View solution in original post


All Replies
Highlighted
Sixteen Stars
Sixteen Stars

Re: Problem with using tFileInputDelimited

Field separator must not appear in the content, that's the problem you have, field separator is "," and it appears in content (LWNAME = fife,WA).

You must change the separator in the source file, or enclose field values between quotation marks ("fife,WA") and tick "CSV options" field.


TRF

View solution in original post

Highlighted
Seven Stars

Re: Problem with using tFileInputDelimited

Checking CSV options worked. I tried this earlier but don't know why it didn't get to work, might be missed something.
Thanks @TRF Smiley Happy

2019 GARTNER 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

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

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog