JdbcDialect

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
}
Table 1. (Subset of) JdbcDialect Contract
Property Description

canHandle

Used when…​FIXME

Table 2. JdbcDialects
JdbcDialect Description

AggregatedDialect

DB2Dialect

DerbyDialect

MsSqlServerDialect

MySQLDialect

NoopDialect

OracleDialect

PostgresDialect

TeradataDialect

getCatalystType Method

getCatalystType(
  sqlType: Int,
  typeName: String,
  size: Int,
  md: MetadataBuilder): Option[DataType]

getCatalystType…​FIXME

Note
getCatalystType is used when…​FIXME

getJDBCType Method

getJDBCType(dt: DataType): Option[JdbcType]

getJDBCType…​FIXME

Note
getJDBCType is used when…​FIXME

quoteIdentifier Method

quoteIdentifier(colName: String): String

quoteIdentifier…​FIXME

Note
quoteIdentifier is used when…​FIXME

getTableExistsQuery Method

getTableExistsQuery(table: String): String

getTableExistsQuery…​FIXME

Note
getTableExistsQuery is used when…​FIXME

getSchemaQuery Method

getSchemaQuery(table: String): String

getSchemaQuery…​FIXME

Note
getSchemaQuery is used when…​FIXME

getTruncateQuery Method

getTruncateQuery(table: String): String

getTruncateQuery…​FIXME

Note
getTruncateQuery is used when…​FIXME

beforeFetch Method

beforeFetch(connection: Connection, properties: Map[String, String]): Unit

beforeFetch…​FIXME

Note
beforeFetch is used when…​FIXME

escapeSql Internal Method

escapeSql(value: String): String

escapeSql…​FIXME

Note
escapeSql is used when…​FIXME

compileValue Method

compileValue(value: Any): Any

compileValue…​FIXME

Note
compileValue is used when…​FIXME

isCascadingTruncateTable Method

isCascadingTruncateTable(): Option[Boolean]

isCascadingTruncateTable…​FIXME

Note
isCascadingTruncateTable is used when…​FIXME

results matching ""

    No results matching ""