IBM DB2 Non-Spatial Reader Parameters
Database Connection
This is the ODBC Data Source Name (DSN) as configured using DB2 client software.
Enter the username and password to access the database, user account, or wherever authentication is required.
Note: If the username and password are already set as part of the ODBC DSN entry, there is no need to re-enter the username and password here.
When enabled, the database connection persists for the duration of an FME session.
For example, it may be desirable to maintain a connection when running a batch of 100 workspaces on the same database connection, which saves the processing time required to make and break a database connection.
FME considers the database connection to be the same when the database name, the username, and password are the same.
The time (seconds) after which to terminate a query to the database if it has not yet returned a connection/result.
If it is set to 0, there is no timeout. The default is 30.
Constraints
After you have specified the database connection, click the Browse button to select tables for import. A connection window appears while the system compiles a table from the database.
Once the table list appears, you can select one or more tables, and then click OK to dismiss the window. The table name(s) will appear in the Table List field in the parameter box.
An SQL WHERE clause can be applied to the selected tables, to constrain the the row selection in tables chosen in the table list (for example, NUMLANES=2).
An SQL WHERE clause can be applied to each table’s columns, to constrain the attributes of the layers selected in the layer list (for example, NUMLANES=2).
Schema Attributes
Use this parameter to expose Format Attributes in 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, you can use this parameter to expose additional attributes on multiple feature types.
Advanced
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.
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.
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.