I’m trying to dynamically add a suffix to all attributes in two Excel files. The suffix will come from the last 10 characters of each Excel file (fme_basename), which is the date the file was produced. I have not been able get this to work using the BulkAttributeRenamer. When choosing the Action “Add String Suffix”, only constants appear to work. I’ve tried using the Text Editor to dynamically create the suffix in the String dialog. I’ve also tried creating the suffix beforehand with an AttribuiteCreator and choosing it for String. Neither work. I’m using FME Form 2023.2.0.0 (Build 23764). Any insight or advice?
This seems to work:
Be aware that the new attributes are Unexposed.
If you know your filenames (fme_basename values) on forehand you could use an AttributeExposer to expose the new attributes.
But FME can't do anything with unexposed attributes because it is not able to predict what filenames you will feed it. But you can dynamicly write the unexposed attributes to a new file.
I think I understand what you mean
So the question becomes… Why would you want to suffix the basename to the attribute. Because it looks like there are better solutions than doing that.
For comparing 2 datasets with two dates, using a changedetector, a matcher or a featuremerger could solve your problem.
Adding the basename suffix to attributes is just a way for people viewing the output to see the time period between the data being compared. I’m using a FeatureMerger to calculate differences between the data in the two time periods.