I'm given a location of files. I'm using the directory and files reader to get all the files in that directory. I then use the featureReader to get only the csv files. There are 181 attributes so instead of exposing them, I'm specifying a feature type to read. The csv files all have the same attributes, just in different orders. For instance one file could have attribute1,attribute2,attribute3 and another file would have attribute2,attribute1,attribute3. I'm using attributeManager to calculate some values and because all the files have the same attributes, I just used the order of the first csv so the order of the attributes leaving attributeManager is always attribute2,attribute1,attribute3.
I am writing out csv based on the name from the path_rootname (to a different folder). The issue is that I need the output files to retain the same attribute order as the input csv. Because all features enter the AttributeManager, they all come out with the order from that transformer. I was reading about dynamic schema and that I could use the schema from the featureReader to specify the order. This works except the schema port of the FeatureReader only showed 1 schema (the first csv). It also only has the file name of the first csv so when I do a featureMerger, I'm only getting records for that csv. Not sure what I'm doing wrong.