Skip to main content

Hi,

on a project, i'm using a FeatureReader to call different shapefiles, localized in different folders.

The purpose is modifying shapefile names to normalize them throw AttributeManager, one for the Schema outpout port and another one for th Generic.

 

Until here, everythnig works.

By the way, i'm trying to modify the attributes format which are being created by the writer, for instance varchar(254) -> varchar(5).

 

With dynamic mode, i guess i have to modify the schema values with some ListExploder -> AttributeManager -> ListBuilder.

Once these operations are done, the new schema has exactly the same attributes name and lists than the original schema, but the dynamic shapefiles aren't writen..

Is there something i'm doing wrong??

Thanks for helping!!!

Hi @aurelienchaumet, I suppose that you are going to configure dynamic writer using a schema feature read by a FeatureReader as schema source.

The schema feature should arrive in the writer feature type before any data feature. It's guaranteed that the FeatureReader outputs schema feature first, but since the ListBuilder is a blocking-transformer, possibly the re-built schema feature would not arrive before data features.

Workarounds are:

  1. Modify the schema definition ("attribute{}" list) with PythonCaller not to block the feature.
  2. Or, merge the modified schema definition to every data feature. In this case, you should remove the "fme_schema_handling" attribute from the schema feature.

Please vote up this Idea :-)

Introduce New Transformer to Modify Schema Easily


Thanks @takashi, I finally used ListElementSetter which call some python code... without having some code to write 😃 and it works !!

Thank you for taking time to answer and for the explanation !!!


Reply