Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
      View Source
      
  const ( // Driver errors ErrNotImplemented = "not implemented" ErrTransactionsNotSupported = "transactions are not supported" ErrParametersNotSupported = "query parameters are not supported" ErrReadQueryStatus = "could not read query status" ErrSentinelTimeout = "sentinel timed out waiting for operation to complete" // Request error messages (connection, authentication, network error) ErrCloseConnection = "failed to close connection" ErrThriftClient = "error initializing thrift client" ErrInvalidURL = "invalid URL" ErrNoAuthenticationMethod = "no authentication method set" ErrInvalidDSNFormat = "invalid DSN: invalid format" ErrInvalidDSNPort = "invalid DSN: invalid DSN port" ErrInvalidDSNPATIsEmpty = "invalid DSN: empty token" ErrBasicAuthNotSupported = "invalid DSN: basic auth not enabled" ErrInvalidDSNMaxRows = "invalid DSN: maxRows param is not an integer" ErrInvalidDSNTimeout = "invalid DSN: timeout param is not an integer" // Execution error messages (query failure) ErrQueryExecution = "failed to execute query" )
Error messages
Variables ¶
      View Source
      
  var DatabricksError error = errors.New("Databricks Error")
    value to be used with errors.Is() to determine if an error chain contains any databricks error
      View Source
      
  var DriverError error = errors.New("Driver Error")
    value to be used with errors.Is() to determine if an error chain contains a driver error
      View Source
      
  var ExecutionError error = errors.New("Execution Error")
    value to be used with errors.Is() to determine if an error chain contains an execution error
      View Source
      
  var RequestError error = errors.New("Request Error")
    value to be used with errors.Is() to determine if an error chain contains a request error
Functions ¶
Types ¶
type DBDriverError ¶
type DBDriverError interface {
	DBError
}
    A fault that is caused by Databricks services
type DBError ¶
type DBError interface {
	// Descriptive message describing the error
	Error() string
	// User specified id to track what happens under a request. Useful to track multiple connections in the same request.
	// Appears in log messages as field corrId.  See driverctx.NewContextWithCorrelationId()
	CorrelationId() string
	// Internal id to track what happens under a connection. Connections can be reused so this would track across queries.
	// Appears in log messages as field connId.
	ConnectionId() string
	// Stack trace associated with the error.  May be nil.
	StackTrace() errors.StackTrace
	// Underlying causative error. May be nil.
	Cause() error
	IsRetryable() bool
	RetryAfter() time.Duration
}
    Base interface for driver errors
type DBExecutionError ¶
type DBExecutionError interface {
	DBError
	// Internal id to track what happens under a query.
	// Appears in log messages as field queryId.
	QueryId() string
	// Optional portable error identifier across SQL engines.
	// See https://github.com/apache/spark/tree/master/core/src/main/resources/error#ansiiso-standard
	SqlState() string
}
    Any error that occurs after the SQL statement has been accepted (e.g. SQL syntax error).
type DBRequestError ¶
type DBRequestError interface {
	DBError
}
    An error that is caused by an invalid request. Example: permission denied, or the user tries to access a warehouse that doesn’t exist
 Click to show internal directories. 
   Click to hide internal directories.