Amazon Redshift Spatial Reader Parameters
About Database Connections |
---|
Database formats include a Database Connection parameter that defines and stores authentication information. For general information about sharing database connections, please see Note that Database Connection parameters differ slightly, depending on context and/or database format. |
Connection From the Connection parameter in a database format, you can do one of the following:
|
Database Connection
Select an existing Redshift database connection, or Add Database Connection...
Add Redshift Database Connection To define a new connection from the Connection parameter in a Redshift Spatial format, see the topic Amazon Redshift Spatial: Add Database Connection |
Schemas for Tables
Schemas are used to organize tables. This parameter provides the list of viewable schemas.
If this parameter is left blank, the Tables dialog will only show choices from the search path for the current user. Selecting specific schemas here will cause tables from those schemas to be shown instead.
This parameter also specifies the schemas to fetch candidate tables when merging feature types. If it is not set, candidate tables are fetched based on the search path for the current user.
Constraints

After specifying the database connection, click the Browse button (...) to select tables for import. A connection window appears while the system retrieves the tables from the database.
Once the Select Tables dialog appears, you can select one or more tables. Click OK to dismiss the window and add the selected table name(s) to the Tables parameter.

Use this parameter to direct FME to read geometry from the database as either Hex Encoded Well-Known Binary (WKB) or Well-Known Text (WKT). Note that the final representation of features is the same with both methods.
- Hex Encoded WKB (default) – Use this option to read Geometry as Hex Encoded WKB from the database.
- WKT – Use this option to read Geometry as WKT. With this mode active, reading speed may be slower and transfer bandwidth may be reduced. Note that with the WKT option, very large geometries have a possibility of throwing a database exception.
Schema Attributes

Additional Attributes to Expose
Use this parameter to expose Format Attributes in FME Workbench when you create a workspace:
- In a dynamic scenario, it means these attributes can be passed to the output dataset at runtime.
- In a non-dynamic scenario, this parameter allows you to expose additional attributes on multiple feature types. Click the browse button to view the available format attributes (which are different for each format) for the reader.
Use Search Envelope

A search envelope (also known as a bounding box) is a rectangular area that defines a geographic area. In FME, the easiest way to define a search envelope is to use search envelope parameters. Defining a search envelope is the most efficient method of selecting an area of interest because FME will read only the data that is necessary – it does not have to read an entire dataset. Search Envelope parameters apply to both vector and raster datasets and can be particularly efficient if the source format has a spatial index. Most FME readers have parameters to define the search envelope of data that is being read:
The parameters include the x and y coordinates of the bounding box as well as a parameter that defines the coordinate system. How to Define the Bounding Box 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 intersect with the bounding box are returned. Note that the bounding box intersection is not a full geometry intersection (based on spatial relationships) that would be returned by a transformer like the SpatialFilter. Note If all four coordinates of the search envelope are left at 0, the search envelope will be disabled even if this option is checked.
|
|||||||
Search Envelope Coordinate System |
Specifies the coordinate system of the search envelope if it is different than the coordinate system of the data. The coordinate system associated with the data to be read must always be set if this parameter is set. If this parameter is set, the minimum and maximum points of the search envelope are reprojected from the Search Envelope Coordinate System to the reader’s coordinate system prior to applying the envelope. |
||||||
Clip to Search Envelope |
The underlying function for Use Search Envelope is an intersection; however, when Clip to Search Envelope is checked, a clipping operation is also performed.
|
Search Method
This parameter specifies the type of spatial relationship the query features must have with the Use Search Envelope parameter in order to be returned.
- When Use Search Envelope is selected, the default value is MBR Overlaps.
Value
The value of Search Method can be one of the following:
Search Method |
Description |
MBR Overlaps |
Determines whether the search envelope and target feature overlap each other. Maximum Bounding Rectangle (MBR) operations determine adherence to a given spatial relationship using only the bounding box of the geometry. |
Contains |
Determines whether the search envelope is completely contained by the target feature. |
Disjoint |
Determines whether the intersection of search envelope with the target feature is an empty set. |
Equals |
Determines whether the search envelope and target feature are of the same type and have identical x,y coordinate values. |
Intersects |
Determines whether the intersection of search envelope and target feature does not result in an empty set. This is the exact opposite of Disjoint. |
Overlaps |
Determines whether the search envelope and target feature overlap each other. |
Touches |
Determines whether any of the points common to search envelope and target feature intersect the interiors of both geometries. At least one geometry must be a linestring, polygon, multilinestring, multipolygon. |
Within |
Determines whether the target feature is completely within the search envelope. This is exactly opposite to Contains. |
Advanced

The number of rows that are retrieved at one time into local memory from the data source. For example, if the value is set to 10000, the reader reads 10,000 rows into local memory, and processes features from this memory buffer. After the reading the last row, the reader retrieves the next 10,000 rows from the data source.

This parameter allows for the execution of SQL statements before opening a table for reading. For example, it may be necessary to create a temporary view before attempting to read from it.
For detailed information about SQL functions, click the corresponding menu item in the
.Available menu options depend on the format.
Multiple SQL commands can be delimited by a character specified using the FME_SQL_DELIMITER
directive, embedded at the beginning of the SQL block. The single character following this directive will be used to split the SQL block into SQL statements, which will then be sent to the database for execution. Note: Include a space before the character.
For example:
FME_SQL_DELIMITER ; DELETE FROM instructors ; DELETE FROM people WHERE LastName='Doe' AND FirstName='John'
Multiple delimiters are not allowed and the delimiter character will be stripped before being sent to the database.
Any errors occurring during the execution of these SQL statements will normally terminate the reader or writer (depending on where the SQL statement is executed) with an error. If the specified statement is preceded by a hyphen (“-”), such errors are ignored.

This parameter allows for the execution of SQL statements after a set of tables has been read. For example, it may be necessary to clean up a temporary view after creating it.
For detailed information about SQL functions, click the corresponding menu item in the
.Available menu options depend on the format.
Multiple SQL commands can be delimited by a character specified using the FME_SQL_DELIMITER
directive, embedded at the beginning of the SQL block. The single character following this directive will be used to split the SQL block into SQL statements, which will then be sent to the database for execution. Note: Include a space before the character.
For example:
FME_SQL_DELIMITER ; DELETE FROM instructors ; DELETE FROM people WHERE LastName='Doe' AND FirstName='John'
Multiple delimiters are not allowed and the delimiter character will be stripped before being sent to the database.
Any errors occurring during the execution of these SQL statements will normally terminate the reader or writer (depending on where the SQL statement is executed) with an error. If the specified statement is preceded by a hyphen (“-”), such errors are ignored.