Skip to main content
Solved

Generic Reader - CSV parameters

  • January 13, 2015
  • 3 replies
  • 27 views

Hello,

 

 

When using the Generic Reader and running a CSV file through it, is it possible to specify the CSV parameters somewhere. In the Log file when I run it as is I see:

 

 

Opening the GENERIC Reader on dataset `C:\\Temp\\Northgate_Edgbaston.csv'

 

CSV Reader: Opening CSV files in directory `C:\\Temp/\\'

 

CSV Reader: Separator Character: ','

 

CSV Reader: Skip Duplicate Delimiters: no

 

CSV Reader: Strip Quotes From Fields: no

 

CSV Reader: File Has Field Names: no

 

CSV Reader: Field Names Follow Header: no

 

CSV Reader: Number of Lines to Skip: 0

 

CSV Reader: Number of Footer Lines to Skip: 0

 

CSV Reader: Encoding name ''

 

CSV Reader: Allowing Spaces in Column Names: no

 

CSV Reader: Max features to scan for schema: 10000

 

CSV Reader: Opening dataset 'C:\\Temp\\Northgate_Edgbaston.csv'

 

 

But I'd like to be able to set these parameters so that I can specify that the CSV file has field names and to strip quotes from fields.

 

 

Thank you,

 

 

Peter.

Best answer by fmelizard

Hi Peter,

 

 

Add a csv reader as a workspace resource, configure the reader's parameters to your liking and voila, the generic reader will use them.

 

This also applies to the generic writer, but with a dedicated writer of the formats used.

 

Hope this helps,

 

Itay
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • January 13, 2015
Hi,

 

 

Appearently on the Generic reader not.

 

But if you use a csv reader for csv, you can do that in the parameter section on the reader.

fmelizard
Safer
Forum|alt.badge.img+19
  • Safer
  • Best Answer
  • January 13, 2015
Hi Peter,

 

 

Add a csv reader as a workspace resource, configure the reader's parameters to your liking and voila, the generic reader will use them.

 

This also applies to the generic writer, but with a dedicated writer of the formats used.

 

Hope this helps,

 

Itay

Thanks for your help, I've added a CSV Reader as Resource and got it to work fine. As it forced you to put a path in for the CSV file I've just put in '.' instead of a dummy file. This seems to be working fine.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings