Class SnowflakeDialect

Object
org.apache.spark.sql.jdbc.JdbcDialect
org.apache.spark.sql.jdbc.SnowflakeDialect
All Implemented Interfaces:
Serializable, org.apache.spark.internal.Logging, NoLegacyJDBCError, scala.Equals, scala.Product

public class SnowflakeDialect extends JdbcDialect implements NoLegacyJDBCError, scala.Product, Serializable
See Also:
  • Constructor Details

    • SnowflakeDialect

      public SnowflakeDialect()
  • Method Details

    • apply

      public abstract static R apply()
    • toString

      public static String toString()
    • canHandle

      public boolean canHandle(String url)
      Description copied from class: JdbcDialect
      Check if this dialect instance can handle a certain jdbc url.
      Specified by:
      canHandle in class JdbcDialect
      Parameters:
      url - the jdbc url.
      Returns:
      True if the dialect can be applied on the given jdbc url.
    • isObjectNotFoundException

      public boolean isObjectNotFoundException(SQLException e)
      Overrides:
      isObjectNotFoundException in class JdbcDialect
    • getJDBCType

      public scala.Option<JdbcType> getJDBCType(DataType dt)
      Description copied from class: JdbcDialect
      Retrieve the jdbc / sql type for a given datatype.
      Overrides:
      getJDBCType in class JdbcDialect
      Parameters:
      dt - The datatype (e.g. StringType)
      Returns:
      The new JdbcType if there is an override for this DataType
    • isSyntaxErrorBestEffort

      public boolean isSyntaxErrorBestEffort(SQLException exception)
      Description copied from class: JdbcDialect
      Attempts to determine if the given SQLException is a SQL syntax error.

      This check is best-effort: it may not detect all syntax errors across all JDBC dialects. However, if this method returns true, the exception is guaranteed to be a syntax error.

      This is used to decide whether to wrap the exception in a more appropriate Spark exception.

      Overrides:
      isSyntaxErrorBestEffort in class JdbcDialect
      Parameters:
      exception - (undocumented)
      Returns:
      true if the exception is confidently identified as a syntax error; false otherwise.