trino

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricsStrategy added in v0.4.3

type MetricsStrategy func(ctx context.Context, db *sqlx.DB, tableRow *scrapper.TableRow, tableMetricsRow *scrapper.TableMetricsRow) error

type TrinoCatalog added in v0.4.3

type TrinoCatalog struct {
	CatalogName   string `db:"catalog_name"   json:"catalog_name"`
	ConnectorId   string `db:"connector_id"   json:"connector_id"`
	ConnectorName string `db:"connector_name" json:"connector_name"`
	IsAccepted    bool   `db:"-"              json:"is_accepted"`
}

func (*TrinoCatalog) String added in v0.4.3

func (c *TrinoCatalog) String() string

type TrinoQueryLogSchema added in v0.5.0

type TrinoQueryLogSchema struct {
	QueryId         string                `db:"query_id"`
	State           *string               `db:"state"`
	User            *string               `db:"user"`
	Source          *string               `db:"source"`
	Query           *string               `db:"query"`
	ResourceGroupId trino.NullSliceString `db:"resource_group_id"`
	QueuedTimeMs    *int64                `db:"queued_time_ms"`
	AnalysisTimeMs  *int64                `db:"analysis_time_ms"`
	PlanningTimeMs  *int64                `db:"planning_time_ms"`
	Created         *time.Time            `db:"created"`
	Started         *time.Time            `db:"started"`
	LastHeartbeat   *time.Time            `db:"last_heartbeat"`
	End             *time.Time            `db:"end"`
	ErrorType       *string               `db:"error_type"`
	ErrorCode       *string               `db:"error_code"`
}

type TrinoScrapper

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

func NewTrinoScrapper

func NewTrinoScrapper(ctx context.Context, conf *TrinoScrapperConf) (*TrinoScrapper, error)

func (*TrinoScrapper) Close

func (e *TrinoScrapper) Close() error

func (*TrinoScrapper) DialectType

func (e *TrinoScrapper) DialectType() string

func (*TrinoScrapper) Executor added in v0.4.3

func (e *TrinoScrapper) Executor() *dwhexectrino.TrinoExecutor

func (*TrinoScrapper) FetchQueryLogs added in v0.5.0

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

func (*TrinoScrapper) IsPermissionError

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

func (*TrinoScrapper) QueryCatalog

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

func (*TrinoScrapper) QueryCustomMetrics

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

func (*TrinoScrapper) QueryDatabases

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

func (*TrinoScrapper) QuerySegments

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

func (*TrinoScrapper) QuerySqlDefinitions

func (e *TrinoScrapper) QuerySqlDefinitions(origCtx context.Context) ([]*scrapper.SqlDefinitionRow, error)

func (*TrinoScrapper) QueryTableMetrics

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

func (*TrinoScrapper) QueryTables

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

func (*TrinoScrapper) SqlDialect

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

func (*TrinoScrapper) ValidateConfiguration

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

type TrinoScrapperConf

type TrinoScrapperConf struct {
	*dwhexectrino.TrinoConf
	Catalogs               []string
	UseShowCreateView      bool
	UseShowCreateTable     bool
	FetchMaterializedViews bool
	FetchTableComments     bool
}

Jump to

Keyboard shortcuts

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