Class SnowflakeDriver

  • All Implemented Interfaces:
    Driver
    Direct Known Subclasses:
    SnowflakeDriver

    public class SnowflakeDriver
    extends Object
    implements Driver
    JDBC Driver implementation of Snowflake for production. To use this driver, specify the following URL: jdbc:snowflake://host:port

    Note: don't add logger to this class since logger init will potentially break driver class loading

    • Field Detail

      • EMPTY_PROPERTIES

        public static final Properties EMPTY_PROPERTIES
      • implementVersion

        public static String implementVersion
      • disableIncidents

        protected static boolean disableIncidents
    • Constructor Detail

      • SnowflakeDriver

        public SnowflakeDriver()
    • Method Detail

      • isDisableArrowResultFormat

        public static boolean isDisableArrowResultFormat()
      • getDisableArrowResultFormatMessage

        public static String getDisableArrowResultFormatMessage()
      • getImplementationTitle

        public static String getImplementationTitle()
        Utility method to verify if the standard or fips snowflake-jdbc driver is being used.
        Returns:
      • getJdbcJarname

        public static String getJdbcJarname()
        Utility method to get the complete jar name with version.
        Returns:
      • acceptsURL

        public boolean acceptsURL​(String url)
        Checks whether a given url is in a valid format.

        The current uri format is: jdbc:snowflake://[host[:port]]

        jdbc:snowflake:// - run in embedded mode jdbc:snowflake://localhost - connect to localhost default port (8080)

        jdbc:snowflake://localhost:8080- connect to localhost port 8080

        Specified by:
        acceptsURL in interface Driver
        Parameters:
        url - url of the database including host and port
        Returns:
        true if the url is valid
      • connect

        public Connection connect​(String url,
                                  Properties info)
                           throws SQLException
        Connect method
        Specified by:
        connect in interface Driver
        Parameters:
        url - jdbc url
        info - addition info for passing database/schema names
        Returns:
        connection
        Throws:
        SQLException - if failed to create a snowflake connection
      • jdbcCompliant

        public boolean jdbcCompliant()
        Specified by:
        jdbcCompliant in interface Driver
      • isDisableIncidents

        public static boolean isDisableIncidents()
      • setDisableIncidents

        public static void setDisableIncidents​(boolean throttleIncidents)
      • main

        public static final void main​(String[] args)