Skip to main content

Hi all,

I have some open data from the UK Ordnance Survey of place names.

There is a CSV file for each OS grid tile containing XY coordinates and the name and details of the location. However these files do not contain field headers. The field headers are supplied in a separate CSV.

I would like to create geometry files from the CSVs but don't know how to apply the field names from one CSV to others so my outputs can have the correct fields names.

Is this something FME can do? Once the field names are in place then I can use a VertexCreator and assign X/Y to the correct fields

Attached is some sample data.

Thanks in advance

How dynamic do you need the process to be? Do you just need to preprocess a bunch of csv files to add the same header?


How dynamic do you need the process to be? Do you just need to preprocess a bunch of csv files to add the same header?

All the CSVs are uniform (Some have more columns but this is accounted for in the filed header file) so it doesn't need to be dynamic.

I was hoping something could be done within FME instead of preprocessing each file.

Under parameters of the CSV reader there's an option for custom field headers but I am unable to change the names:

CSV_Parameters


Hey, give the attached ago. It makes use of schemas and a bit of python to dynamically create fields and the required schemas

 


Reply