databricks

package
v0.9.4-rc2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: Apache-2.0 Imports: 31 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScopeFromConf added in v0.10.0

func ScopeFromConf(conf *DatabricksScrapperConf) *scope.ScopeFilter

ScopeFromConf translates the Databricks config's CatalogBlocklist field into a ScopeFilter. The blocklist patterns are comma-separated catalog (database) patterns. Returns nil if no filtering is configured.

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) FetchTableChangeHistory added in v0.9.2

func (e *DatabricksScrapper) FetchTableChangeHistory(
	ctx context.Context,
	fqn scrapper.DwhFqn,
	from, to time.Time,
	limit int,
) ([]*scrapper.TableChangeEvent, 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) QueryShape added in v0.8.3

func (e *DatabricksScrapper) QueryShape(ctx context.Context, sql string) ([]*scrapper.QueryShapeColumn, error)

func (*DatabricksScrapper) QuerySqlDefinitions

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

func (*DatabricksScrapper) QueryTableConstraints added in v0.9.0

func (e *DatabricksScrapper) QueryTableConstraints(ctx context.Context) ([]*scrapper.TableConstraintRow, 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