Sources
JDBC Sources
JDBC sources read from PostgreSQL, MySQL, MSSQL, or Oracle. An asset reads a table or a query, and a declared schema overrides inference.
Providers: postgres, mysql, mssql, oracle
Asset fields
Every asset in this type carries these fields; provider and format values live under options.
| Field | Type | Default | Notes |
|---|---|---|---|
name (required) | string | - | - |
chain | object | - | Per-row iteration over a previously loaded asset. When set, offset is not allowed. |
chain.from (required) | string | - | FQN of a previous asset whose distinct rows drive per-row iteration (e.g. sources.source_name.asset_name). |
chain.pass_columns (required) | boolean | - | When true, prepend the parent row's columns onto every result row produced by that chained iteration. |
chain.prepend_label | string | - | Optional prefix concatenated onto passed parent column names to avoid name conflicts (e.g. 'right_'). |
table | string | - | - |
query | string | - | - |
schema | string | - | Optional schema definition for jdbc-based sources (e.g., psql, mysql, mssql, oracle...). Format: 'field1 type1, field2 type2, ...' or multi-line string for better readability. |
offset | object | - | - |
offset.key (required) | string | - | - |
offset.response_key | string | - | - |
offset.initial_value (required) | string | - | Initial offset value. |
offset.type (required) | timestamp or datetime or date or integer or int or long or id or string or text or cursor or token or page | - | - |
offset.format | string | - | Optional target format used to reformat the value extracted from response_key so it matches the requestParam format expected by the API. Applied only when type is 'timestamp' or 'integer'. For timestamp: 'iso8601' (default), 'epoch_millis', 'epoch_seconds', or any DateTimeFormatter pattern (e.g. 'yyyy-MM-dd'). For integer: any java.util.Formatter pattern (e.g. '%d', '%08d', '%x'). |
Minimal example
A complete jdbc source with one asset, written for provider postgres:
Code
Providers
postgres, mysql, mssql, oracle
Connection
Use settings.connection_name for a saved connection, or configure it inline:
| Field | Type | Default | Notes |
|---|---|---|---|
url (required) | string | - | - |
database (required) | string | - | - |
auth (required) | object | - | - |
auth.user (required) | string | - | - |
auth.password (required) | string | - | - |
Settings options
settings.options:
| Field | Type | Default | Notes |
|---|---|---|---|
driver | string | - | The class name of the JDBC driver to use to connect to this URL. |
partitions_number | integer | - | The maximum number of partitions that can be used for parallelism in table reading and writing. Maps to numPartitions. |
query_timeout | integer | - | The number of seconds the driver will wait for a Statement object to execute. Zero means there is no limit. Maps to queryTimeout. |
keytab | string | - | Location of the kerberos keytab file for the JDBC client. |
principal | string | - | Specifies kerberos principal name for the JDBC client. |
refresh_krb5_config | boolean | - | This option controls whether the kerberos configuration is to be refreshed or not for the JDBC client before establishing a new connection. Maps to refreshKrb5Config. |
connection_provider | string | - | The name of the JDBC connection provider to use to connect to this URL, e.g. db2, mssql. Maps to connectionProvider. |
Asset options
assets[].options:
| Field | Type | Default | Notes |
|---|---|---|---|
prepare_query | string | - | A prefix that will form the final query together with query. Similar to CTE in SQL. Maps to prepareQuery. |
partition_column | string | - | The name of the column to partition the data by. Maps to partitionColumn. |
lower_bound | string | - | The lower bound of the partition column. Maps to lowerBound. |
upper_bound | string | - | The upper bound of the partition column. Maps to upperBound. |
fetch_size | integer | - | The number of rows to fetch at a time. Maps to fetchsize. |
session_init_statement | string | - | After each database session is opened to the remote DB and before starting to read data, this option executes a custom SQL statement. Maps to sessionInitStatement. |
custom_schema | string | - | The custom schema to use for the data. Maps to customSchema. |
push_down_predicate | boolean | - | The option to enable or disable PUSH_DOWN_PREDICATE push-down into V2 JDBC data source. Maps to pushDownPredicate. |
push_down_aggregate | boolean | - | The option to enable or disable PUSH_DOWN_AGGREGATE push-down into V2 JDBC data source. Maps to pushDownAggregate. |
push_down_limit | boolean | - | The option to enable or disable LIMIT push-down into V2 JDBC data source. Maps to pushDownLimit. |
push_down_offset | boolean | - | The option to enable or disable OFFSET push-down into V2 JDBC data source. Maps to pushDownOffset. |
push_down_table_sample | boolean | - | The option to enable or disable TABLESAMPLE push-down into V2 JDBC data source. Maps to pushDownTableSample. |
prefer_timestamp_without_timezone | boolean | - | When the option is set to true, all timestamps are inferred as TIMESTAMP WITHOUT TIME ZONE. Maps to preferTimestampNTZ. |
Related pages
Last modified on