Skip to main content
Question

SchemaScanner and dynamic FeatureWriter method


cavarly
Contributor
Forum|alt.badge.img+1

I am attempting to write out data using a schema scanner and dynamic featurewriter.
It is simply not working. I always get "Unknown feature type 'BOUNDS' passed to the JSON writer.
It doesn't matter what I do, always the same.
BOUNDS is my fme_feature_type and fme_feature_type_name.
I will eventually use group by attribute but it doesn't even work with just one type

I believe I am following the standard practice but I have always been stumped when trying to write dynamically.  

Please could someone outline the boiler plate method (with the steps ordered) to use a SchemaScanner and Dynamic FeatureWriter in the scenario where one would need to create or overwrite fme_feature_type and fme_feature_type_name or use a custom names for these. As I understand it, I should only need to make sure I have an attribute on the data with the same name as the Schema Definition Name.

THANKS!

 

NOTE below, feature_type_name is not available to choose, in this iteration

 

 

3 replies

nielsgerrits
VIP
Forum|alt.badge.img+53

I also often struggle to get this to work. Most of the times my issue is the order of features. The schema feature must reach the FeatureWriter before any data features. I use AttributeCreators to create attributes “Order” with value 1 for the schema and 2 for the data features and a sorter which sorts on order. This usually solves my issue.


nielsgerrits
VIP
Forum|alt.badge.img+53
nielsgerrits wrote:

...

Attached working sample.

 


bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • August 28, 2024

Same, I usually use a Sorter with a dummy AttributeCreator Attribute to sort on to make sure the Schema Feature(s) arrives to the Writer first.

Sorter works because it is one of the “Blocker” Transformers that lets no features past it until it is completed its operation in its default Blocking mode, and so prevents a parallel workflow getting around it to send other features first to the Writer.

Apart from that have to watch that some Readers and Transformers output Schema Features with either slightly different Feature Type Attribute Names needing to be renamed to match the Data Features Feature Type Attribute Name, or even slightly differently formatted Feature Type values where the Schema Feature may need to be exploded temporarily, modified, and then rebuilt into a Schema Attribute List.


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