Skip to main content
Best Answer

FeatureWriter, ESRI Shape, and a single feature = problems

  • June 11, 2021
  • 2 replies
  • 27 views

lifalin2016
Supporter
Forum|alt.badge.img+40

Hi list.

I'm using FeatureWriter to write some data into a temporary ZIP file, that is being attached to an email.

When I have the situation, where a single feature needs to be output in ESRI Shape format (inside the ZIP), it seems that the file isn't being written at all !?!?

I've tried different file locations, different file names etc., nothing works.

But if I add a Cloner with a value of 2, the file gets written as expected.

What gives ?

Best answer by hkingsbury

I'm taking a guess here that you're using a dynamic writer with the schema source set to "Schema From Schema Feature?"

 

You need to make sure that you don't have an attribute called "fme_schema_handling"

 

See here https://community.safe.com/s/article/dynamic-workflows-advanced-example-modifying-the-s

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

hkingsbury
Celebrity
Forum|alt.badge.img+67
  • Celebrity
  • Best Answer
  • June 13, 2021

I'm taking a guess here that you're using a dynamic writer with the schema source set to "Schema From Schema Feature?"

 

You need to make sure that you don't have an attribute called "fme_schema_handling"

 

See here https://community.safe.com/s/article/dynamic-workflows-advanced-example-modifying-the-s


lifalin2016
Supporter
Forum|alt.badge.img+40
  • Author
  • Supporter
  • June 15, 2021

I'm taking a guess here that you're using a dynamic writer with the schema source set to "Schema From Schema Feature?"

 

You need to make sure that you don't have an attribute called "fme_schema_handling"

 

See here https://community.safe.com/s/article/dynamic-workflows-advanced-example-modifying-the-s

Thanks @hkingsbury​ 

I do indeed use dynamic output in a FeatureWriter with schema source set to "Schema from Schema Feature".

However, the final tidbit, about why it's necessary to remove 'fme_schema_handling' from the features, which explains what happens, is missing in the picture. @virtualcitymatt​ explained that in another of my questions, and the article filled in the blanks.

If 'fme_schema_handling' is set to 'schema_only' on the features, which will happen when you merge a schema feature from a FeatureReader onto the data features, the FeatureWriter will remove the first received feature from the stream, and use this for schema definition only.

If 'fme_schema_handling' is missing (or set to a different value??), it will still use the first feature for schema definition, because dynamic output is requested, but leave it in the data stream.

This does explain the behaviour I've encountered.