I have csv data in a single attribute like this (field names are first line).
Grower,Date,SampleNum,P,K,C
1000,05/01/2018,350,275,1500
how can I parse this into feature(s) with the correct collums using fme?
I have csv data in a single attribute like this (field names are first line).
Grower,Date,SampleNum,P,K,C
1000,05/01/2018,350,275,1500
how can I parse this into feature(s) with the correct collums using fme?
In the CSV reader you can:
- Check the box to have field names in the first row
- Determine the , to be the separator
FME will then read all rows and use the first row for attribute naming.
In the CSV reader you can:
- Check the box to have field names in the first row
- Determine the , to be the separator
FME will then read all rows and use the first row for attribute naming.
But use the AttributeFileWriter to write to a CSV file, followed by a FeatureReader to read as CSV.
In the CSV reader you can:
- Check the box to have field names in the first row
- Determine the , to be the separator
FME will then read all rows and use the first row for attribute naming.
I believe this answer should cover your case:
https://knowledge.safe.com/questions/78520/parse-csv-data-stored-in-database-table.html
The first feature will contain the attribute names, the following features will contain the values. If necessary you can use the Sampler to get rid of the first feature.