The Translator Properties define how the JDBC translator interacts with the underlying database during query execution. These settings allow you to customize behavior such as SQL generation, timezone handling, batching, string trimming, and comment injection.
Configuring these properties can help improve compatibility with specific JDBC drivers, enhance performance, and ensure query semantics match your expectations across different relational systems.
Available Translator Properties
| Parameter | Description | Default |
|---|---|---|
DatabaseTimeZone |
The time zone of the database. This is used when fetching DATE, TIME, or TIMESTAMP values to ensure proper conversion. |
The system default time zone |
DatabaseVersion |
Specifies the target database version to tune pushdown support. If unset, the version is derived from DatabaseMetaData.getDatabaseProductVersion. Automatic detection requires an active connection. If capability detection fails (e.g., due to issues obtaining a connection), you can explicitly set this property. Use the method JDBCExecutionFactory.usesDatabaseVersion() to control whether the translator should use a connection to detect capabilities. |
(Derived automatically) |
TrimStrings |
When true, trailing whitespace is trimmed from fixed-length character strings. This is useful because the translator treats trailing whitespace as meaningful by default (due to varchar behavior). |
false |
UseBindVariables |
When true, queries are executed using PreparedStatements, replacing literal values with bind variables. If false, PreparedStatements are used only for LOB values. |
true |
UseCommentsInSourceQuery |
When enabled, includes a leading comment in the generated SQL for traceability. The comment contains session and request metadata. Customize the format using the CommentFormat property. |
false |
CommentFormat |
A MessageFormat string template used to generate the SQL comment when UseCommentsInSourceQuery is enabled. Supported placeholders: - 0: session ID - 1: parent request ID - 2: request part ID - 3: execution count - 4: user name - 5: VDB name - 6: VDB version - 7: transactional status |
— |
MaxPreparedInsertBatchSize |
Specifies the maximum number of rows included in a single prepared insert batch. | 2048 |
StructRetrieval |
Controls how STRUCT types are retrieved from the database. Supported modes: - OBJECT: uses getObject() - COPY: uses SerialStruct - ARRAY: returns values as arrays |
OBJECT |
EnableDependentJoins |
Enables pushdown of dependent joins for databases that support temporary tables (e.g., DB2, Derby, H2, HSQL 2.0+, MySQL 5.0+, Oracle, PostgreSQL, SQL Server, Sybase). | false |