Question

SchemaMapper_Mapper(SchemaMappingFactory): A required column was not found in the table

  • 14 February 2017
  • 5 replies
  • 20 views

Badge +2

Hi,

 

I have this small workspace that reads a textfile with MSSQL Spatial Queries that are posted to a database. All area features are, next to being written as area, diverted to an InsidePointreplacer to generate a label. After this, all features are remapped to their target feature types in a set of shapefiles. Here's what drives me crazy... If there is an Inspector connected to the Schemamapper Unmapped port, it runs fine (even there are no features passed to the Unmapped port). If I disable the Inspector and run the workspace, it fatals and gives me the required column error message. Huh?? I'm using FME Workbench FME(R) 2015.1.3.1 (20151117 - Build 15573 - WIN32). I attached the workspace and resources.

5 replies

Userlevel 5
Badge +25

Hard to say without being able to see the data coming out of MSSQL, but I think this may be one of those cases that's best sent to support (and/or test in FME 2016/2017 first)

Badge +2

Hi @redgeographics,

I worked around the problem by copying the FEAT column, that is in de database results, to the fme_feature_type attribute.

I think it has something to do with the SchemaMapper trying to use fme_feature_type (which is default set to QueryFactory_SQLExecute) both as search key and as destination. Supplying the inspector (or Run to Inspection) creates a different target feature type, and that is the featuretype the SchemaMapper uses. When disabled or not present and with all writers GO the SchemaMapper has no target featuretype any more and crashes at the first feature to arrive.

NB This workaround voids the need for my SchemaMapper...

I tested this behaviour on our FME Server environment (which is a newer version, 2016.1.0.1) and it crashes even with an Inspector connected (one could expect this since inspectors play no role in FME Server).

Badge +2

Hi, run into this again, even on FME 2019.1

This is the data I used:SchemaMapper_fme_feature_type_failure.fmwt

Any body ideas?

Badge +2

Ok, after use of transformers like AttributeExploder FME somehow 'forgets' what the fme_feature_type of the feature is and somehow the SchemaMapper needs this information. Adding an AttributeCreator where the featuretype is set to the original schema featuretype from the source dataset, solved the error.

Badge +6

Hi @helmoet

 

 

This looks to be a known issue with the AttributeExploder(FMEENGINE-29063). I've linked this posting to the issue so that any fixes will be posted here as they become available.

 

In the meantime, if you toggle the Keep attributes section of the AttributeExploder, this should allow the SchemaMapper to run correctly. You will get far more features(due to the exposing) but you could filter those out before the SchemaMapper, or let the SchemaMapper do it for you.

Reply