Returns a factory for creating connections to the given JDBC URL.
Returns a factory for creating connections to the given JDBC URL.
- JDBC options that contains url, table and other information.
Creates a table with a given schema.
Drops a table from the JDBC database.
Retrieve standard jdbc types.
Retrieve standard jdbc types.
The datatype (e.g. org.apache.spark.sql.types.StringType)
The default JdbcType for this DataType
Takes a ResultSet and returns its Catalyst schema.
Takes a ResultSet and returns its Catalyst schema.
A StructType giving the Catalyst schema.
SQLException
if the schema contains an unsupported type.
Returns a PreparedStatement that inserts a row into table via conn.
Convert a ResultSet into an iterator of Catalyst Rows.
Saves a partition of a DataFrame to the JDBC database.
Saves a partition of a DataFrame to the JDBC database. This is done in a single database transaction (unless isolation level is "NONE") in order to avoid repeatedly inserting data as much as possible.
It is still theoretically possible for rows in a DataFrame to be inserted into the database more than once if a stage somehow fails after the commit occurs but before the stage can return successfully.
This is not a closure inside saveTable() because apparently cosmetic implementation changes elsewhere might easily render such a closure non-Serializable. Instead, we explicitly close over all variables that are used.
Saves the RDD to the database in a single transaction.
Compute the schema string for this RDD.
Returns true if the table already exists in the JDBC database.
Truncates a table from the JDBC database.
Util functions for JDBC tables.