Skip to main content
Question

How to control attribute type and width in the workspace to influence automatic feature definition in writer?

  • December 12, 2022
  • 3 replies
  • 181 views

ekkischeffler
Contributor
Forum|alt.badge.img+5

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?

3 replies

nielsgerrits
VIP
Forum|alt.badge.img+54

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.


Forum|alt.badge.img+2
  • December 12, 2022

@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.


ekkischeffler
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • December 13, 2022

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!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings