Skip to main content

Just spotted this problem in my corporate data extraction workflow.

So it is pretty straightforward, a dynamic ESRI Geodatabase SDE FeatureReader that dynamically reads the schema of the Target Feature Classes/Tables from the SDE server.

However, it appears to struggle when there is a Domain on the Field. Where the option to "Resolve" the Domain to a separate "_Resolved" attribute is used that contains the Domain Description values, it instead reads the Schema for the relevant base field as TEXT rather than as LONG (meaning both Base attribute and the Resolved attribute get a TEXT data type assigned in the Schema Feature)

That creates an issue when flowing that to a Dynamic FeatureWriter which uses the (incorrect) Schema Feature Data Type to write it out to a Text field rather than a Long.

Anyone got any Workarounds? I'm thinking the only way to do it is to manually override the Data Type Attributes in the Schema Feature by doing a separate Schema Reader to override the Schema Feature that the ESRI Geodatabase SDE Reader is coming up with, and instead feed this to the Dynamic Writer.

....as an aside, the SubType resolver doesn't work at all on the FeatureReader or an equivalent Reader either, but separate issue!

FME2018

Here's what happens if I turn Off the FeatureReader option "Resolve Domains"

This gets the correct Schema data type of a (Long) Integer

However, when "Resolve Domains" is turned On, instead get this. It appears to be erroneously reading the Domain Descriptions rather than the Domain Value Data type to set the Data Type.


This is my best workaround can come up with at the moment unless anyone can suggest a better way. Basically I use 2 FeatureReaders:

  • FeatureReader #1 reads Schema Only, but with "Resolve Domains" OFF. The Schema Features from this are used in a later FeatureMerger to override the incorrect Schema Data Types assigned from the Schema Reader in FeatureReader #2
  • FeatureReader #2 reads both Schema and Feature, and with "Resolve Domains" ON. However, due to the bug assigning the Domain Description data types to the base attribute instead of the "_resolved" attribute, then an AttributeCreator with Adajcent Feature Handling moves the Data Type values recorded against the Base Attributes to the partner "_resolved" attributes. Eg. Write the Data Type values from "PZONENAME" to "PZONENAME_resolved"


Reply