@robertdbuckley
Here is a way to do it (drag drop file didnt work for me, so here are pics)
Greets.
Basically you need to sort the features, for which a numeric value works best.So assuming you know the attribute names in advance, put an AttributeCreator/Manager down.Create SortKey and use conditional mode.If attribute exists abcd then SortKey=1, else if attribute exists abcde then SortKey=2
Then sort data by SortKey.
Does that help?
Use schema reader and path reader to create a list of attributes to create a file_attributename table.
U can use a merger on filename to link schema and path.
I found workspaces posted here 2014 about exactly the same question.
I vote for stack-exchange like point rewardsystem ...;)
This is an interesting one for sure.I think we need to understand a bit more of the problem before we can provide some additional guidance.
In particular, do you know at the time you make the workspace what the field names are for all the CSV files you're working with.Or do you need to make a workspace that will work with any set of CSVs someone may throw at you, whose column names you don't know.
If it is the former situation and you know the field names (schemas) ahead of time, then I can imagine one workflow to explore.
If you don't know the field names, then another (more complex) workflow would be needed.
Lastly, AttributeExploder potentially could be your friend here...but I won't make that promise.
Maybe provide us with a set of input files (faked if necessary) and desired output and we can puzzle from that...
To expose names of attributes that are attached to the features the AttributeExposer transformer can be used.The CSV reader has an option to skip the first line and use the contents as field names.I assume you used that option on the reader.
You can get the attribute name from a schema reader, the schema port of the FeatureReader transformer, or in python using the getAllAttributeNames method.