Skip to main content
Solved

manual attribute type definition in CSV reader (FME v2022.1)

  • June 6, 2023
  • 3 replies
  • 171 views

mzuer
Contributor
Forum|alt.badge.img+5

Dear all,

I am using a CSV reader to read my data from csv file. I have a column that contains almost only integer except 5 values, that contain a letter (e.g. 12a or 12b). Unfortunately the reader set the Type of this attribute to uint32, and the values that contain a letter are set to Null... So I loose this information...

It seems that in older versions of FME there was possible to choose "Manual" for "Attribute definition" parameter. But I doesn't see this option in the 2022.1 version of FME.

How could I do then to force this column to be read as a string ?

I've seen that it is possible to specify manually attribute types in the FeatureReader, but could I use this transformer to read a file ? (I set the file path in the parameter, but I don't know what to pass in input, and the output is empty)

 

Thanks in advance for any help

Best answer by nielsgerrits

you can use a Creator to initiate the FeatureReader.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, 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

nielsgerrits
VIP
Forum|alt.badge.img+62
  • Best Answer
  • June 6, 2023

you can use a Creator to initiate the FeatureReader.


mzuer
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • June 30, 2023

thanks ! it is what I did finally but was curious to know if it was possible to do it with the csv reader


nielsgerrits
VIP
Forum|alt.badge.img+62

thanks ! it is what I did finally but was curious to know if it was possible to do it with the csv reader

Cheers. I'm quite sure it can also be done in a classic CSV reader but since the FeatureReader was added I've never used a classic reader anymore, so I need to really look into it. Personally I prefer the Creator / FeatureReader over the classic reader as I find it more intuitive.