Class JdbcDialects

Object
org.apache.spark.sql.jdbc.JdbcDialects

public class JdbcDialects extends Object
Developer API Registry of dialects that apply to every new jdbc org.apache.spark.sql.DataFrame.

If multiple matching dialects are registered then all matching ones will be tried in reverse order. A user-added dialect will thus be applied first, overwriting the defaults.

Note:
All new dialects are applied to new jdbc DataFrames only. Make sure to register your dialects first.
  • Constructor Details

    • JdbcDialects

      public JdbcDialects()
  • Method Details

    • registerDialect

      public static void registerDialect(JdbcDialect dialect)
      Register a dialect for use on all new matching jdbc org.apache.spark.sql.DataFrame. Reading an existing dialect will cause a move-to-front.

      Parameters:
      dialect - The new dialect.
    • unregisterDialect

      public static void unregisterDialect(JdbcDialect dialect)
      Unregister a dialect. Does nothing if the dialect is not registered.

      Parameters:
      dialect - The jdbc dialect.
    • get

      public static JdbcDialect get(String url)
      Fetch the JdbcDialect class corresponding to a given database url.
      Parameters:
      url - (undocumented)
      Returns:
      (undocumented)