Skip to content

JDBC Connector

Spark SQL supports loading data from tables using JDBC.

Spark developers use DataFrameReader.jdbc to load data from an external table using JDBC.

val table =, table, properties)

// Alternatively
val table ="jdbc").options(...).load(...)

These one-liners create a DataFrame that represents the distributed process of loading data from a database and a table (with additional properties).