JdbcDialect
is the base of JDBC dialects that handle a specific JDBC URL (and handle necessary type-related conversions to properly load a data from a table into a DataFrame
).
package org.apache.spark.sql.jdbc
abstract class JdbcDialect extends Serializable {
// only required properties (vals and methods) that have no implementation
// the others follow
def canHandle(url : String): Boolean
}
Property | Description |
---|---|
|
JdbcDialect | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getCatalystType(
sqlType: Int,
typeName: String,
size: Int,
md: MetadataBuilder): Option[DataType]
getCatalystType
…FIXME
Note
|
getCatalystType is used when…FIXME
|
getJDBCType(dt: DataType): Option[JdbcType]
getJDBCType
…FIXME
Note
|
getJDBCType is used when…FIXME
|
quoteIdentifier(colName: String): String
quoteIdentifier
…FIXME
Note
|
quoteIdentifier is used when…FIXME
|
getTableExistsQuery(table: String): String
getTableExistsQuery
…FIXME
Note
|
getTableExistsQuery is used when…FIXME
|
getSchemaQuery(table: String): String
getSchemaQuery
…FIXME
Note
|
getSchemaQuery is used when…FIXME
|
getTruncateQuery(table: String): String
getTruncateQuery
…FIXME
Note
|
getTruncateQuery is used when…FIXME
|
beforeFetch(connection: Connection, properties: Map[String, String]): Unit
beforeFetch
…FIXME
Note
|
beforeFetch is used when…FIXME
|
escapeSql(value: String): String
escapeSql
…FIXME
Note
|
escapeSql is used when…FIXME
|
compileValue(value: Any): Any
compileValue
…FIXME
Note
|
compileValue is used when…FIXME
|