Reader Overview

The SDE reader begins by starting an SDE session with the server upon which the SDE dataset resides. Once connected, the SDE reader queries the SDE and passes the resulting features – that is, rows – on to the FME for processing.

When reading features from the SDE, the tables from which features are retrieved are specified in the mapping file using the <ReaderKeyword>_IDs. An optional spatial component and WHERE clause may also be specified. If no spatial or attribute constraints are specified, then all features from the identified table(s) are read.

The SDE reader requires that a <ReaderKeyword>_IDs statement be specified, identifying the tables from which data is to be retrieved. If no identifiers (IDs) are specified, then no features are read from the database.

The table below summarizes the different feature retrieval modes supported by the SDE reader module for a Spatial Retrieval search type. The next section contains an in-depth discussion of each of these keywords.

Search Keyword Suffix

Description

IDs

Specifies the tables from which features are to be retrieved. If no tables are specified, then no features are retrieved. Each ID specified may be simple or compound.

A simple ID is an ID that specifies only one table.

A compound ID is one in which several tables are specified – this is not supported when reading raster data. When a compound ID is specified, features are constructed by joining several tables together during the query.

A single IDs statement consists of one or more IDs, each of which may be simple or compound.

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.

The only valid value for SEARCH_METHOD for raster features is SDE_ENVELOPE.

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.

Currently only valid for vector features.

SEARCH_METHOD_FILTER

Specifies if the features returned will or will not satisfy the spatial constraint. If FALSE is specified, then all features returned will not satisfy the spatial constraint. If TRUE is specified, then the features returned will satisfy the spatial constraint. Specifying FALSE enables you to select all features which are not contained by a feature, for example.

Value: FALSE | TRUE

Default: TRUE

WHERE

Specifies the attribute constraint that a feature must have to be retrieved. Any valid SQL WHERE clause may be entered here as this value is passed directly to the underlying RDBMS for processing.

When compound IDs are used, the WHERE clause specifies how the tables are joined during the query.

Currently only valid for vector features.

Note: Search feature and multi-table joins are not currently supported for raster tables.