Skip to main content

I like using the automatic feature definition in the writer - attributes are defined automatically based on input.

 

Sometimes I wish I could influence the type and width (string length, field width) of the attribute within my workflow, to ensure the attribute is written out correctly. I know I can switch to manual feature definition and change it there but that makes things harder.

 

I've tried a number of transformers but I could not find any that would influence how the automatic setting interprets the attribute.

 

Does anyone know of a way to do this?

I think the SchemaScanner is currently the best way to do this. This will generate a Schema Feature, based on the attribute types in the data, which can be used in a FeatureWriter set to Dynamic Writing. See the article How to Use the SchemaScanner Transformer.

 

As an alternative you can try to create a new or modify a existing Schema Feature.

 

A third alternative, to set attribute types in workbench, is in development according to this idea.


@ekkischeffler​ SchemaScanner gives FME's interpretation of the data types. If you can, use FeatureReader <Schema> port - that returns the schema derived from the source data model, so might be more representative of what you want. Then ListSearcher to find where in the attribute{} list the attribute you want to influence. But both options mean you have shifted to a dynamic writer. The idea that @nielsgerrits​ refers to is under development.


Thanks @nielsgerrits​ and @Mark Stoakes​ - I already thought a dynamic writer would be required.

I'll keep it simple, using the automatic definition where possible and hopefully the Attribute Manager will see an update soon!


Reply