Documentation
¶
Index ¶
- Variables
- func NewConnector(opts *Options) driver.Connector
- type AuthError
- type ColumnName
- type ConnRawAccess
- type Driver
- type Metadata
- func (m Metadata) GetColumns(ctx context.Context, schemaPattern string, tableNamePattern string, ...) ([]ColumnName, error)
- func (m Metadata) GetSchemas(ctx context.Context, schemaPattern string) ([]string, error)
- func (m Metadata) GetTables(ctx context.Context, schemaPattern string, tableNamePattern string) ([]TableName, error)
- type Options
- type TableName
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultOptions for impala driver DefaultOptions = Options{BatchSize: 1024, BufferSize: 4096, Port: "21050", LogOut: io.Discard} )
var ( // ErrNotSupported means this operation is not supported by impala driver ErrNotSupported = isql.ErrNotSupported )
Functions ¶
func NewConnector ¶
NewConnector creates connector with specified options
Types ¶
type AuthError ¶ added in v1.1.0
AuthError indicates that there was an authentication or authorization failure. The error message documents the username that was used, if any. errors.Unwrap() returns the underlying error that was interpreted as auth. failure, if any. This error will not be top-level in the chain - earlier errors in the chain reflect the process during which the auth. error happened.
type ColumnName ¶ added in v1.1.0
type ColumnName = hive.ColumnName
ColumnName contains all attributes that identify a columns
type ConnRawAccess ¶ added in v0.2.0
ConnRawAccess exposes the Raw method of sql.Conn
type Driver ¶
type Driver struct{}
Driver to impala
func (*Driver) Open ¶
Open creates new connection to impala using the given data source name. Implements driver.Driver. Returned error wraps any errors coming from thrift or stdlib - typically crypto or net packages. If TLS is requested, and server certificate fails validation, error chain includes *tls.CertificateVerificationError If there was an authentication error, error chain includes one of the exported auth. errors in this package.
type Metadata ¶ added in v0.1.1
type Metadata struct {
// contains filtered or unexported fields
}
Metadata exposes the schema and other metadata in an Impala instance
func NewMetadata ¶ added in v0.1.1
NewMetadata creates Metadata instance with the given Impala DB as data source. A new connection will be retrieved for any call. If that's an issue, use NewMetadataFromConn
func NewMetadataFromConn ¶ added in v0.2.0
func NewMetadataFromConn(conn ConnRawAccess) *Metadata
NewMetadataFromConn creates Metadata instance with the given Impala connection as data source *sql.Conn implements ConnRawAccess
func (Metadata) GetColumns ¶ added in v1.1.0
func (m Metadata) GetColumns(ctx context.Context, schemaPattern string, tableNamePattern string, columnNamePattern string) ([]ColumnName, error)
GetColumns retrieves columns that match the provided LIKE patterns
func (Metadata) GetSchemas ¶ added in v0.2.0
GetSchemas retrieves schemas that match the provided LIKE pattern