JDBC 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:
|
Connection Parameters

The connection string for the database to which you are connecting. The precise format depends on the JDBC driver being used, but a connection string will always start with:
jdbc:<subprotocol>:
See the FME Community for information about the compatibility of various JDBC drivers with FME, and to view FME Workbench examples.

If not specified in the JDBC Connection String, enter the username and password to access the database.

In most cases, this parameter is not required for well-behaved JDBC 4.0+ drivers. However, in order for the connection string to be processed only by the desired driver, we recommend specifying the name of the Java class of the desired driver.
This parameter is required for drivers that do not self-register.

Yes – Connection strings and properties for database connections are masked in translation and error logs. Connection details may contain sensitive information, such as passwords. A masked connection string appears as:
jdbc:<subprotocol>:************
While masked connection properties appear as:
{<property_name1>=************, <property_name2>=************, ...}
Warning Connection strings for connections whose parameters are embedded in the workspace are not masked, regardless of this setting.
No – Connection strings and properties are logged in plain text.

JDBC connections can be configured with driver-specific arbitrary name/value pairs. The name/value pairs can often be specified in either the Connection String or a Properties object (sometimes only in one way or the other).
Name/value pairs entered here will be set in the order specified, then passed on in a Properties object. They do not require manual encoding of characters that are not safe in Connection Strings.

This parameter defines the time, in seconds, after which a query will be terminated if it has not yet returned a result.
If set to 0, there is no timeout. The default is 30.
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.

The WHERE clause parameter is used to constrain the row selection in tables chosen in the Tables parameter. FME will select only the rows (records) that match this condition.
The easiest method to construct a WHERE clause is by using the editor. Click the browse button (...) to open the editor, and use the SQL functions to construct the clause.
You can also type a WHERE clause directly in the parameter field:
Examples |
---|
When querying integer and number data types: NUMLANES = 2 LENGTH > 2000 |
If the WHERE clause SQL is invalid, the translation will fail.

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.
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.
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.