Skip to main content
Question

Generating writer sub-folder when using the dynamic schema


Forum|alt.badge.img
Hi everyone,

 

 

If I'm using the Dynamic Schema to write out, can I create a sub-folder based on input formats or elsewhere?  I've got a workbench I want to publish to FME server, it's quite basic. It takes shp files, runs them through a GeometryFilter and then adds appropritate statistics, i.e. for points it add the coordinates, for polygons it adds areas, etc.

 

 

They write out to three different destination folders using dynamic schema:

 

 

\\data\\Tasks\\Geometry_Statistics\\Writer\\Points

 

\\data\\Tasks\\Geometry_Statistics\\Writer\\Polylines

 

\\data\\Tasks\\Geometry_Statistics\\Writer\\Polygons

 

 

These all appear as published parameters in FME server, what I'd like to do is have it so users can just specify:

 

 

\\data\\Tasks\\Geometry_Statistics\\Writer\\

 

 

with FME doing the rest, i.e. dynamically creating the sub-folders.  I've worked out you can link the destination to a parameter, but I can't see how you can make that parameter kind of dynamic, i.e. choose between geometry and therefore folder names.  I don't know how to pass this information onto the writer.

 

 

The other option is that I use the fanout but I'm not entirely sure how to do it that way either!  I can concatenate a folder address, but not sure how to add this to the destination direction parameter (if at all possible).

 

 

Thanks.

2 replies

david_r
Evangelist
  • April 9, 2013
Hi,

 

 

I believe the easiest is to use a fanout dataset:

 

 

 

 

You can either expose and use "fme_geometry" from the reader directly or use an AttributeValueMapper to transform the value into something more suitable.

 

 

David

Forum|alt.badge.img
  • Author
  • April 10, 2013
I didn't know you could fanout and use the dynamic schema at the same time, you learn something new every day!  Thanks (again) David.

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