Skip to content

JdbcDialect

JdbcDialect is an abstraction of JDBC dialects that can handle a specific JDBC URL and all the necessary type-related conversions to properly load a data from a JDBC table into a DataFrame.

JdbcDialect is a Serializable (Java).

JdbcDialect is a DeveloperApi.

Contract

canHandle

canHandle(
  url : String): Boolean

Checks out whether the dialect can handle the given JDBC URL

Used when:

  • JdbcDialects is requested for the dialect to handle a given URL

Implementations

getTableExistsQuery

getTableExistsQuery(
  table: String): String

getTableExistsQuery is the following SQL statement (to be used to find out if the table exists):

SELECT 1 FROM [table] WHERE 1=0

getTableExistsQuery is used when: