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
Returns an Insert SQL statement for copying all rows from the source table into the target table via JDBC conn.
Parses the user specified customSchema option value to DataFrame schema, and returns a schema that is replaced by the custom schema's dataType if column name is matched.
Returns an Insert SQL statement for inserting a row into the target table via JDBC conn.
Takes a ResultSet and returns its Catalyst schema.
Takes a ResultSet and returns its Catalyst schema.
If true, all the columns are nullable.
A StructType giving the Catalyst schema.
SQLException
if the schema contains an unsupported type.
Returns the schema if the table already exists in the JDBC database.
Returns an truncate SQL statement for truncating a table via JDBC conn.
Returns true if the table is empty
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 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 without side effects.
Util functions for JDBC tables.