Skip to main content

I am using a 'PythonCreator' and 'PythonCaller' transformer to create a series of SQL select statements. The latter are used in a 'SQL Executor' transformer to read many features from an oracle db. Eventually, these features have to be written to .json files.

 

 

Because I initially used the PythonCreator, all the feature have 'fme_feature_type' set to 'PythonCreator'. When using the GEOJSON writer in FME Desktop 2017.0 (build 17259, 64 bit) , this results in an error message: 'Unknown feature type 'PythonCreator' passed to the JSON writer'. Other writers (SDF, shape, excel, etc.) work fine.

If I use an attribute manager to set the 'fme_feature_type' attribute to other values, the writer works fine.

 

 

Could anyone explain why the writer has problems with an fme_feature_type named PythonCreator?

I could not find an answer in the documentation on the GEOJSON writer; so that is why I am asking it on this platform.

Strange. Are you perhaps using dynamic schema on the GeoJSON writer?


Yes, the writer is set to dynamic and it uses an excel as a schema resource. Does that change anything?


When using a dynamic writer, the default behavior is to use the fme_feature_type attribute to match an incoming feature with the reader schema:

If the value of fme_feature_type changes during the workspace to a value that doesn't match a reader feature type, you'll get the error message you reported.

A possible solution could be to copy the value of fme_feature_type to another attribute just after your reader and then use that attribute as "feature type name" in the writer, rather than fme_feature_type.


Yes, the writer is set to dynamic and it uses an excel as a schema resource. Does that change anything?

Since you are using a schema resource (schema definition table) to configure the dynamic writer feature type, the Schema Definition Name has to match one of the feature type names which you defined in the schema resource.

 

As @david_r mentioned, the Schema Definition Name is equal to the destination feature type name and it has been set to "fme_feature_type" by default, but you can also change the Schema Definition Name to a proper feature type name that you have defined in the schema resource, if necessary.

david_r and takashi , I was fully aware of that. Somehow, I still failed to spot this in the properties of my writer. Stupid mistake, but thanks!


Hi, I got this error too when running on a completely "schema on the fly". With that I mean, I only used creator to generate features. I used the following setup:

  • Using ListBuilder (creating list with name "attribute" having two attributes, name and fme_data_type.
  • After that, using AttributeCreator to create attributes fme_feature_type and fme_feature_type_name attributes.
  • It appears to be necessairy to generate this schema having an other attribute fme_schema_handling having the value "schema_only" to make this work on a dynamic writer.

Reply