databricks

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DatabaseType = "databricks"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host    string `json:"host"`
	Port    int    `json:"port"`
	Path    string `json:"path"`
	Token   string `json:"token"`
	Catalog string `json:"catalog"`
	Schema  string `json:"schema"`

	TunnelInfo *sshtunnel.Config `json:"tunnel_info,omitempty"`

	RetryAttempts    int           `json:"retryAttempts"`    // default: 4
	MinRetryWaitTime time.Duration `json:"minRetryWaitTime"` // default: 1s
	MaxRetryWaitTime time.Duration `json:"maxRetryWaitTime"` // default: 30s
	MaxConnIdleTime  time.Duration `json:"maxConnIdleTime"`  // default: disabled

	UseLegacyMappings bool `json:"useLegacyMappings"`
}

func (*Config) Parse

func (c *Config) Parse(input json.RawMessage) error

type DB

type DB struct {
	*base.DB
	// contains filtered or unexported fields
}

func NewDB

func NewDB(configJson json.RawMessage) (*DB, error)

NewDB creates a new databricks db client

func (*DB) ListColumns added in v1.1.0

func (db *DB) ListColumns(ctx context.Context, relation sqlconnect.RelationRef) ([]sqlconnect.ColumnRef, error)

ListColumns returns a list of columns for the given table

func (*DB) RenameTable

func (db *DB) RenameTable(ctx context.Context, oldRef, newRef sqlconnect.RelationRef) error

RenameTable in databricks falls back to MoveTable if rename is not supported

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL