Question

Trouble with dynamic schema from PostGIS to FileGDB ArcObjects

  • 3 May 2018
  • 1 reply
  • 1 view

Badge +1

I seem to have broken the way FileGDB ArcObjects can handle dynamic schemas and I'm not sure what went wrong. If I switch to a FileGDB API, it works.

I have the following:

  • PostGIS reader that can pull in more than one feature type at a time. Ex. Powerline, Railway
  • FileGDB ArcObject writers with a template file that define fields, domain-coded values, subtypes, etc. It also uses fanout to produce the right folder structure. Ex:
    • Transportation/Access.gdb/Railway
    • Utility Communication/Utility.gdb/Powerline

The error I'm getting is:

ERROR |Unable to find the schema definition 'Railway' for feature with feature type name 'Railway'. Ensure the feature type name is correct and that its schema definition exists in the schema source

Things I've tried:

  • When I use the FileGDB API writer with as much of the same parameters as the ArcObjects writer, I can get the expected output, but I'll need the coded values, subtypes, etc.
  • Use SchemaMapper to map the feature_type_name from PostGIS to be the same as what the GDB feature class name should be. Ex: bfgen_access.Railway -> Railway
  • Use AttributeRemover to remove fme_schema_handling - I'm not sure what this does, but I use this attribute to decide when to perform clipping after the PostGIS reader.

Any help is appreciated! I'm attaching the workspace, one of the GDB template files, and the SchemaMapper file.


1 reply

Userlevel 2
Badge +17

Hi @lottegis, if you intend to apply schema definitions contained by the schema features (output from the Schema port of the FeatureReader) to destination schemas, you can send the schema features directly to the dynamic writer feature type without any transformation. In the case, you should not modify "fme_feature_type" held by the data features, since you have set "fme_feature_type" to the "Schema Definition Name" parameter and therefore the dynamic writer feature type would identify each schema definition via source feature type name including the table qualifier "bfgen_access.".

Reply