I have 15 .csv files with different names but the same fields and a total of 1406 records. They are in the same directory. I want to merge all 15 files together and append the source file name to each record. I've tried FilenamePartExtractor, FilePathExtractor, and FeatureReader but haven't been able to to get the desired result. I usually get back more records than I put in. Is there a straight forward method to append file name to each record?
Solved
Append filename field to .csv bulk import Reader
Best answer by david_r
I'm not sure what the FilePathExtractor does, but based on the description on FME Hub I'm doubting it's what you want.
The easiest is probably to expose the feature attribute "fme_basename" on the reader and then rename it as required before writing. This attribute will contain the source CSV filename minus the file extension.

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.
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.


