Skip to main content

Hi,

I am reading SHP files and writing them out into a file geodatabase, using Dynamic Schema Definition.

All the features are being dropped. It seems that one SHP attribute "FAST_TRACK" (Small Integer - 0 for all features) is being read by FME as Boolean value (string: false):

 

WARN |FileGDB Writer: The `Fast_Track' attribute could not be written. The containing feature has been dropped

2019-03-19 09:58:31| 1.3| 0.0|WARN |Attribute(string) : `Fast_Track' has value `false'

 

Can you please advise how to force FME not to read the zero value as false?

 

Thanks, Monika

I don't think FME converts the value read from a numeric type field in a Shapefile dataset to a string value 'false'. What data type is shown for the 'Fast_Track' field in the Shapefile reader feature type?


The logical type in Shapefile (originally from DBF) format is not a numeric type, it represents logical true or false.

On the other hand, File Geodatabase format doesn't support logical type, and ArcGIS treats logical type as Short Integer type.

In FME, the Shapefile reader maps a value from logical type in Shapefile to 'fme_boolean' ('true' or 'false'), and Esri Geodatabase (File Geodb) [GEODATABASE_FILE] writer maps 'fme_boolean' to Short Integer in File Geodatabase format ('true' -> non-0, 'false' -> 0). I think the [GEODATABASE_FILE] writer could convert a logical value to a numeric value automatically.

However, in my observation, Esri Geodatabase (File Geodb Open API) [filegdb] writer doesn't seem to map 'fme_boolean' to Short Integer as expected. I suppose that you are using [filegdb] writer.

A workaround is to change the writer from [filegdb] to [GEODATABASE_FILE] if possible.

Or, if you have to use [filegdb] writer anyway, convert the logical attribute value to numeric ('true' -> non-0, 'false' -> 0) with the AttributeValueMapper before writing.


The logical type in Shapefile (originally from DBF) format is not a numeric type, it represents logical true or false.

On the other hand, File Geodatabase format doesn't support logical type, and ArcGIS treats logical type as Short Integer type.

In FME, the Shapefile reader maps a value from logical type in Shapefile to 'fme_boolean' ('true' or 'false'), and Esri Geodatabase (File Geodb) [GEODATABASE_FILE] writer maps 'fme_boolean' to Short Integer in File Geodatabase format ('true' -> non-0, 'false' -> 0). I think the [GEODATABASE_FILE] writer could convert a logical value to a numeric value automatically.

However, in my observation, Esri Geodatabase (File Geodb Open API) [filegdb] writer doesn't seem to map 'fme_boolean' to Short Integer as expected. I suppose that you are using [filegdb] writer.

A workaround is to change the writer from [filegdb] to [GEODATABASE_FILE] if possible.

Or, if you have to use [filegdb] writer anyway, convert the logical attribute value to numeric ('true' -> non-0, 'false' -> 0) with the AttributeValueMapper before writing.

Hi @takashi

thanks a lot, changing the writer from open FGDB to GEODATABASE worked.

Much appreciated.

Monika


Reply