Data FlowData Flow
DataFlow
  • User Manual
  • Developer Manual
  • Examples
  • API Reference
Overview
Getting Started
Pipeline Authoring
    Pipeline Spec OverviewConnections
    Sources
    Transforms
    Destinations
      DestinationsFile System DestinationsObject Storage DestinationsJDBC DestinationsNoSQL DestinationsStream DestinationsAPI Destinations
    Execution Settings
Execution
Deployment
Troubleshooting
Examples
Destinations

JDBC Destinations

JDBC destinations write to PostgreSQL, MySQL, MSSQL, or Oracle.

Providers: postgres, mysql, mssql, oracle

Output fields

Every output in this type carries these fields; provider and format values live under options.

FieldTypeDefaultNotes
name (required)string--
mode (required)overwrite or append or upsert--
from (required)string--
table (required)string--
keysarray of string--

Minimal example

A complete jdbc destination with one output, written for provider postgres:

Code
destinations: - name: orders type: jdbc provider: postgres # Reuse a saved connection instead of the fields below: # connection_name: <name> settings: url: jdbc:postgresql://<host>:5432/orders database: <database> auth: user: <user> password: <password> outputs: - name: orders_output mode: overwrite from: <from> table: public.orders

Providers

postgres, mysql, mssql, oracle

Connection

Use settings.connection_name for a saved connection, or configure it inline:

FieldTypeDefaultNotes
url (required)string--
database (required)string--
auth (required)object--
auth.user (required)string--
auth.password (required)string--

Settings options

settings.options:

FieldTypeDefaultNotes
driverstring-The class name of the JDBC driver to use to connect to this URL.
partitions_numberinteger-The maximum number of partitions that can be used for parallelism in table reading and writing. Maps to numPartitions.
query_timeoutinteger-The number of seconds the driver will wait for a Statement object to execute. Zero means there is no limit. Maps to queryTimeout.
keytabstring-Location of the kerberos keytab file for the JDBC client.
principalstring-Specifies kerberos principal name for the JDBC client.
refresh_krb5_configboolean-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_providerstring-The name of the JDBC connection provider to use to connect to this URL, e.g. db2, mssql. Maps to connectionProvider.
string_typestring-The type of string to use for the JDBC URL. Maps to stringtype.

Output options

outputs[].options:

FieldTypeDefaultNotes
batch_sizeinteger1000The JDBC batch size, which determines how many rows to insert per round trip. Maps to batchsize.
isolation_levelNONE or READ_UNCOMMITTED or READ_COMMITTED or REPEATABLE_READ or SERIALIZABLE-The transaction isolation level, which applies to current connection. Maps to isolationLevel.
truncateboolean-This is a JDBC writer related option. When SaveMode.Overwrite is enabled, this option causes Spark to truncate an existing table instead of dropping and recreating it.
cascade_truncateboolean-This is a JDBC writer related option. If the JDBC database supports CASCADE TRUNCATE, this option determines whether to use it. Maps to cascadeTruncate.
create_table_optionsstring-This is a JDBC writer related option. If specified, this option allows setting of database-specific table and partition options when creating a table. Maps to createTableOptions.
create_table_column_typesstring-The database column data types to use instead of the defaults when creating the table. Maps to createTableColumnTypes.

Streaming query options

These apply to every output in a streaming pipeline:

FieldTypeDefaultNotes
output_modeappend or complete or updateappendOutput mode of the streaming query. append: only new rows; complete: full result table; update: only updated rows (since 2.0). Maps to outputMode.
trigger_intervalstring-Trigger interval for processing (e.g. '10 seconds', '1 minute'). When set, uses Trigger.ProcessingTime(interval). Maps to triggerInterval.
checkpoint_locationstring-Optional custom checkpoint directory. When not set, a default under /app/data/spark-checkpoints/ is used. Maps to checkpointLocation.
query_namestring-Name for the streaming query (for monitoring and debugging). Maps to queryName.

Related pages

  • Destinations
  • Connections
  • Pipeline Spec Overview
  • API Reference
Suggest edit
Last modified on November 26, 2026
Object Storage DestinationsNoSQL Destinations
On this page
  • Output fields
  • Minimal example
  • Providers
    • postgres, mysql, mssql, oracle
  • Streaming query options
  • Related pages
YAML