Skip to main content
The user funning my FME workspace enters a year at run time which is used for selecting records.  I want to use the year they entered in the name of a user attribute in the writer feature class. 

 

 

Referencing the parameter in the user attributes using $(parameter) doesn't work.  I can successfully rename an attribute to incorporate the parameter value with the AttributeRenamer transformer, but the writer feature class won't use that attribute.

 

 

What do I need to do to make this work?
To use a Published Parameter as an Attributename in the workspace use a AttributeRenamer with $(Date) both as Default Value and as New Attribute (copy/paste attached workspace)

 

 

http://pastebin.com/TT4xzWKh

 

 

For the writer it needs to be DYNAMIC I guess, so ALL Attributes are valid output. Not sure if there is a workaround for this.

 

 


The transformers work... I believe the dynamic writer is my solution, and I haven't been able to figure out how to use a dynamic writer to apply the parameter to an attribute name on the writer.  Can anyone point me to documentation for that process?
I think what you're after is "Dynamic Properties" in th writer. I've been able to get this working myself creating reader and writer combinations that don't rely on hard coded attribute names. For a reader it the merge filter, for a writer it's Dynamic Properties. It takes a bit of fiddling around as there's schema names and all sorts of things to consider, but once you've created the runtime insance of an attribute (either through a PythonCaller or some other means) you can get all dynamic attributes to be written using this "Dynamic Properties" section in the writer.

Reply