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.
Reply
Rich Text Editor, editor1
Editor toolbars
Press ALT 0 for help
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.