Skip to main content
Solved

How to write dynamic attribute names ?

  • January 20, 2023
  • 2 replies
  • 126 views

Forum|alt.badge.img

Hi All,

I'm trying to create and write dynamic attribute name with the joined workspace.

 

In a FFS file, I have C-SEGMT entities. I would like to count how any entities I have until the current year (e.g. 2023) but also for the two previous years (e.g. 2022 and 2021) and put the result in a dynamic attribute name (for my example, three attributes named "NumEntities__2023", "NumEntities__2022" and "NumEntities__2021"

 

I can create them, as you can see it in my Workbench and the screen capture, but I don't know how to write them in my Writer. It's OK for a FFS Writer, but if I want to write in a GEOJson file or other formats, it fails.

 

I could name them directly "NumEntities__2023", "NumEntities__2022", "NumEntities__2021" ; or I could expose them with AttributeExposer : I can see their name if I have enabled feature caching. But my goal is, if I run the workbench next year, the attributes will be automatically renamed "NumEntities__2024", "NumEntities__2023", "NumEntities__2022".

 

Does anyone has any idea ? The attributes must be in the same file and same FeatureType, so I can't use the fanout option (but maybe I have used it wrong). Published Parameter ?

 

Many thanks !

Have a good day

Best answer by nielsgerrits

Please check Tutorial: Dynamic Workflows and more specific Dynamic Workflows: Destination Schema is Derived from a Schema Feature

 

I think I would use the SchemaScanner to create a Schema Feature and use that to write the schema dynamic as data defines it.

View original
Did this help you find an answer to your question?

2 replies

nielsgerrits
VIP
Forum|alt.badge.img+54
  • Best Answer
  • January 20, 2023

Please check Tutorial: Dynamic Workflows and more specific Dynamic Workflows: Destination Schema is Derived from a Schema Feature

 

I think I would use the SchemaScanner to create a Schema Feature and use that to write the schema dynamic as data defines it.


Forum|alt.badge.img
  • Author
  • January 20, 2023
nielsgerrits wrote:

Please check Tutorial: Dynamic Workflows and more specific Dynamic Workflows: Destination Schema is Derived from a Schema Feature

 

I think I would use the SchemaScanner to create a Schema Feature and use that to write the schema dynamic as data defines it.

Hi Niels,

 

It perfectly works ! The tutorial is clear enough to get what I want.

 

Many thanks

Have a good day


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