Reader Directives
The directives that are processed by the Teradata Spatial reader are listed below. The suffixes shown are prefixed by the current <ReaderKeyword>
_ in a mapping file. By default, the <ReaderKeyword>
for the Teradata Spatial reader is COM.SAFE.FME.TERADATA_SPATIAL
.
DATASET/DATABASE
This directive specifies the name of the Teradata database. The database must exist in the RDBMS.
Required/Optional
Required
Mapping File Syntax
<ReaderKeyword>_DATASET testdb
Workbench Parameter
Teradata Spatial Dataset
HOST
This directive specifies the machine running the Teradata DBMS as either an IP address or host name. The database must have proper permissions.
Required/Optional
Required
Mapping File Syntax
<ReaderKeyword>_HOST myserver
Workbench Parameter
Host
PORT
When connecting remotely, this directive specifies the Teradata Server port on which to connect to the DBMS service.
The default port is 1025.
Required/Optional
Required
Mapping File Syntax
<ReaderKeyword>_PORT 1025
Workbench Parameter
Port
USER_NAME
The name of user who will access the database. The named user must exist with appropriate Teradata permissions.
There is no default username.
Required/Optional
Required
Mapping File Syntax
<ReaderKeyword>_USER_NAME myuser
Workbench Parameter
Username
PASSWORD
The password of the user accessing the database.
Required/Optional
Required
Mapping File Syntax
<ReaderKeyword>_PASSWORD secret
Workbench Parameter
Password
QUERY_TIMEOUT
The number of seconds each SQL query should be allowed to run before being canceled. A value of 0 disables the timeout.
If the QUERY_TIMEOUT directive is not specified, a value of 30 seconds will be used.
Required/Optional
Optional
Mapping File Syntax
<ReaderKeyword>_QUERY_TIMEOUT 300
Workbench Parameter
Query Timeout (Seconds)
DEF
The syntax of the definition is:
<ReaderKeyword>_DEF <tableName> \
<fieldName> <fieldType> ] +
The <tableName> must match a Teradata table in the database. This will be used as the feature type of all the features read from the table.
The <fieldType> of each field must be given, but it is not verified against the database definition for the field. In effect, it is ignored.
The exception to this is the geometry
field type which is not placed in the DEF. This is stored separately in the geometry_columns table of the Teradata database which maps geometry information to the database and table name.
The definition allows specification of separate search parameters for each table. If any of the configuration parameters are given, they will override, for that table, whatever global values have been specified by the reader directives listed above. If any of these parameters is not specified, the global values will be used.
Required/Optional
Required
IDs
This optional specification is used to limit the available and defined database tables files that will be read. If no IDs are specified, then we fall back on DEFs to determine which tables to read. The syntax of the IDs directive is:
<ReaderKeyword>_IDs <featureType1> \ <featureType2> \ <featureTypeN>
The feature types must match those used in DEF lines.
The example below selects only the ROADS table for input during a translation:
<ReaderKeyword>_IDs ROADS
Required/Optional
Optional
MINX, MINY, MAXX, MAXY
These directives when used together specify the spatial extent of the feature retrieval. Only features that interact with the bounding box defined by these directive values are returned.
If this is not supplied, all features will be returned. If either min value is greater than the corresponding max value, the values will be swapped. If less than the entire set of four values are supplied, the supplied values will be ignored and all features will be returned.
The syntax of the directives is:
<ReaderKeyword>_IN_MINX <minX> <ReaderKeyword>_IN_MINY <minY> <ReaderKeyword>_IN_MAXX <maxX> <ReaderKeyword>_IN_MAXY <maxY>
The example below selects a small area for extraction:
<ReaderKeyword>_IN_MINX 25.6 <ReaderKeyword>_IN_MINY 59.0 <ReaderKeyword>_IN_MAXX 79.2 <ReaderKeyword>_IN_MAXY 124.5
Required/Optional
Optional
SEARCH_ENVELOPE
Using the minimum and maximum x and y parameters, define a bounding box that will be used to filter the input features. Only features that interact with the bounding box are returned.
If all four coordinates of the search envelope are specified as 0, the search envelope will be disabled.
Mapping File Syntax
<ReaderKeyword>_SEARCH_ENVELOPE <minX> <minY> <maxX> <maxY>
Note: If all four coordinates of the search envelope are specified as zero, the search envelope will be disabled.
Required/Optional
Optional
Workbench Parameter
Minimum X, Minimum Y, Maximum X, Maximum Y
CLIP_TO_ENVELOPE
This directive specifies whether or not FME should clip features to the envelope specified in the SEARCH_ENVELOPE
directive.
Values
YES | NO (default)
Mapping File Syntax
<ReaderKeyword>_CLIP_TO_ENVELOPE [yes | no]
Workbench Parameter
Clip To Envelope
RETRIEVE_ALL_TABLE_NAMES
This parameter is only applicable when generating a mapping file, generating a workspace or when retrieving schemas in an FME Objects application.
When set to yes, and if RETRIEVE_ALL_SCHEMAS
is set to no (or missing), names for all of the tables and feature classes in the database are returned. When set to no (or missing), and if RETRIEVE_ALL_SCHEMAS
is similarly set to no (or missing), the schemas requested by the IDs directive are returned.
Note: If RETRIEVE_ALL_SCHEMAS is also set to Yes, then RETRIEVE_ALL_SCHEMAS takes precedence.
Required/Optional
Optional
Values
YES | NO (default)
Mapping File Syntax
Not applicable.
FME Objects applications would include RETRIEVE_ALL_TABLE_NAMES
followed by “YES” in the parameters array passed to IFMEUniversalReader::open()
.
Workbench Parameter
Not applicable (used when you browse a Table List)
EXPOSED_ATTRS
This directive allows the selection of format attributes to be explicitly added to the reader feature type.
This is similar to exposing format attributes on a reader feature type once it has been generated; however, it is even more powerful because it enables schema-driven applications other than Workbench to access and leverage these attributes as if they were explicitly on the schema as user attributes.
The result of picking a list of attributes is a comma-separated list of attribute names and types that will be added to the schema features. Currently all reader feature types will receive the same set of additional schema attributes for a given instance of the reader.
Required/Optional
Optional
Mapping File Syntax
Not applicable.
While it is possible for FME Objects applications to invoke this directive, the required format is not documented.
This directive is intended for use in our GUI applications (for example, Workbench) only.
Workbench Parameter
Additional Attributes to Expose