Skip to main content
Question

Apply field headers from one CSV file to multiple others


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

3 replies

ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • October 9, 2020

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?


  • Author
  • October 9, 2020
ebygomm wrote:

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


hkingsbury
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • October 11, 2020

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

 


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