Reader Overview

The Geodatabase reader begins by opening the Geodatabase dataset that resides within a server/file system. Once opened, the Geodatabase reader queries the Geodatabase and passes the resulting features – that is, rows – on to FME for processing. Every feature that is read is tagged with its original integer object ID (this is the object ID Geodatabase assigns it) under the attribute name geodb_oid.

Unlike other formats supported by FME, the Geodatabase reader has several different reader types to account for file- and enterprise-based datasets, as well as vector and raster:

  • When reading from an Enterprise Geodatabase, the <ReaderType> is GEODATABASE_SDE, GEODATABASE_SDE_RASTER_DATASET, or GEODATABASE_SDE_RASTER_CATALOG.
  • When reading from a Personal Geodatabase (a Microsoft Access file), the <ReaderType> is GEODATABASE_MDB.
  • When reading from a File-based Geodatabase (a folder ending in .gdb), the <ReaderType> is GEODATABASE_FILE, GEODATABASE_FILE_RASTER_DATASET, or GEODATABASE_FILE_RASTER_CATALOG.

By default, the <ReaderKeyword> is the same as the <ReaderType>.

When reading features from the Geodatabase, the tables from which features are retrieved are specified in the mapping file using the <ReaderKeyword>_IDs.

The Geodatabase reader uses the <ReaderKeyword>_IDs statement to identify the tables from which data is to be retrieved. If no identifiers (IDs) are specified and no DEF lines are specified and the Enterprise Geodatabase reader is used, then no features are read from the database. However, if no identifiers (IDs) are specified and no DEF lines are specified and the Personal Geodatabase or File-based Geodatabase reader is used, then all features are read from the database.

The table below summarizes the different feature retrieval modes supported by the Geodatabase reader module. The word table refers to both non-spatial tables and feature classes. However, feature class applies only to feature classes and not tables. The next section contains a detailed description of each directive.

Search Type

Search Directive
Suffix

Description

Non-Spatial and Spatial Retrieval

IDs

Specifies the tables from which features are to be retrieved. If no tables are specified and the Personal Geodatabase or File-based Geodatabase reader is being used then all features are retrieved. If no tables are specified and the Enterprise Geodatabase reader is being used then no features are retrieved.

WHERE

Specifies the attribute constraint that a feature must have to be retrieved. The where clause follows the SQL syntax of the underlying database, except that ORDER BY, GROUP BY, nested queries, and aggregate functions (i.e. MAX, COUNT) cannot be used.

Spatial Retrieval

SEARCH_ENVELOPE

Specifies the spatial extent of the feature retrieval. Only features that have the relationship specified by SEARCH_METHOD with the envelope are returned. This cannot be specified at the same time as a SEARCH_FEATURE is specified.

SEARCH_FEATURE

Specifies a feature with an arbitrary number of coordinates as the search feature. Only features that have the relationship specified by SEARCH_METHOD with the search feature are returned. This cannot be specified at the same time as a SEARCH_ENVELOPE is specified. Also, when specifying the SEARCH_FEATURE, make sure it has a simple geometry. If it does not have a simple geometry, then its geometry is always simplified by the Geodatabase reader.