Skip to main content
Question

My readers are csv files with uniform # of commas in each row, but with no headings. And each file name is unique and needs to be made an attribute. Is there a way to add attribute names as I read in each file?

  • March 29, 2017
  • 1 reply
  • 8 views
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.

1 reply

takashi
Celebrity
  • March 30, 2017

Hi @angela, you can configure the CSV reader to generate the default attribute names (col0, col1, ... colN) through the parameters dialog when you add the reader to a workspace.

In FME 2017, clear (set empty to) the Field Names Line.

In FME 2016, uncheck the File Has Field Names checkbox.

Then rename the default attribute names to your desired names in the workflow.

The source CSV filename will be stored in a format attribute called "fme_basename". You can expose it in the reader feature type dialog.