Help us shape the future of Go! Take the 2026 Go Developer Survey

databricks

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabricksScrapper

type DatabricksScrapper struct {
	// contains filtered or unexported fields
}

func NewDatabricksScrapper

func NewDatabricksScrapper(ctx context.Context, conf *DatabricksScrapperConf) (*DatabricksScrapper, error)

func (*DatabricksScrapper) Close

func (e *DatabricksScrapper) Close() error

func (*DatabricksScrapper) DialectType added in v0.1.8

func (e *DatabricksScrapper) DialectType() string

func (*DatabricksScrapper) Executor

func (*DatabricksScrapper) FetchQueryLogs added in v0.5.0

func (s *DatabricksScrapper) FetchQueryLogs(
	ctx context.Context,
	from, to time.Time,
	obfuscator querylogs.QueryObfuscator,
) (querylogs.QueryLogIterator, error)

func (*DatabricksScrapper) GetApiClient

func (e *DatabricksScrapper) GetApiClient() *databricks.WorkspaceClient

func (*DatabricksScrapper) IsPermissionError added in v0.1.1

func (e *DatabricksScrapper) IsPermissionError(err error) bool

func (*DatabricksScrapper) QueryCatalog

func (e *DatabricksScrapper) QueryCatalog(ctx context.Context) ([]*scrapper.CatalogColumnRow, error)

func (*DatabricksScrapper) QueryCustomMetrics

func (e *DatabricksScrapper) QueryCustomMetrics(ctx context.Context, sql string, args ...any) ([]*scrapper.CustomMetricsRow, error)

func (*DatabricksScrapper) QueryDatabases

func (e *DatabricksScrapper) QueryDatabases(ctx context.Context) ([]*scrapper.DatabaseRow, error)

func (*DatabricksScrapper) QuerySegments

func (e *DatabricksScrapper) QuerySegments(ctx context.Context, sql string, args ...any) ([]*scrapper.SegmentRow, error)

func (*DatabricksScrapper) QuerySqlDefinitions

func (e *DatabricksScrapper) QuerySqlDefinitions(ctx context.Context) ([]*scrapper.SqlDefinitionRow, error)

func (*DatabricksScrapper) QueryTableMetrics

func (e *DatabricksScrapper) QueryTableMetrics(ctx context.Context, lastMetricsFetchTime time.Time) ([]*scrapper.TableMetricsRow, error)

func (*DatabricksScrapper) QueryTables

func (e *DatabricksScrapper) QueryTables(ctx context.Context) ([]*scrapper.TableRow, error)

func (*DatabricksScrapper) SqlDialect added in v0.1.8

func (e *DatabricksScrapper) SqlDialect() sqldialect.Dialect

func (*DatabricksScrapper) ValidateConfiguration

func (e *DatabricksScrapper) ValidateConfiguration(ctx context.Context) ([]string, error)

type DatabricksScrapperConf

type DatabricksScrapperConf struct {
	dwhexecdatabricks.DatabricksConf
	CatalogBlocklist           string
	FetchQueryLogs             bool
	RefreshTableMetrics        bool
	RefreshTableMetricsUseScan bool
	FetchTableTags             bool
	UseShowCreateTable         bool
	// QueryLogsStartTimeBuffer is the time buffer to add before the 'from' timestamp when fetching query logs.
	// This is needed because Databricks API filters by query start time, but we want queries that finished
	// in the target time range. A query that started before 'from' might finish after 'from'.
	// Default: 2 hours. Set to 0 to disable the buffer (use exact 'from' time).
	QueryLogsStartTimeBuffer *time.Duration
}

type Executor

type Executor interface {
	// contains filtered or unexported methods
}

type Tags

type Tags struct {
	CatalogName string `db:"catalog_name" json:"catalog_name"`
	SchemaName  string `db:"schema_name"  json:"schema_name"`
	TableName   string `db:"table_name"   json:"table_name"`
	ColumnName  string `db:"column_name"  json:"column_name"`
	TagName     string `db:"tag_name"     json:"tag_name"`
	TagValue    string `db:"tag_value"    json:"tag_value"`
}

Jump to

Keyboard shortcuts

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