Documentation
¶
Index ¶
- type MetricsStrategy
- type TrinoCatalog
- type TrinoQueryLogSchema
- type TrinoScrapper
- func (e *TrinoScrapper) Close() error
- func (e *TrinoScrapper) DialectType() string
- func (e *TrinoScrapper) Executor() *dwhexectrino.TrinoExecutor
- func (s *TrinoScrapper) FetchQueryLogs(ctx context.Context, from, to time.Time, obfuscator querylogs.QueryObfuscator) (querylogs.QueryLogIterator, error)
- func (e *TrinoScrapper) IsPermissionError(err error) bool
- func (e *TrinoScrapper) QueryCatalog(ctx context.Context) ([]*scrapper.CatalogColumnRow, error)
- func (e *TrinoScrapper) QueryCustomMetrics(ctx context.Context, sql string, args ...any) ([]*scrapper.CustomMetricsRow, error)
- func (e *TrinoScrapper) QueryDatabases(ctx context.Context) ([]*scrapper.DatabaseRow, error)
- func (e *TrinoScrapper) QuerySegments(ctx context.Context, sql string, args ...any) ([]*scrapper.SegmentRow, error)
- func (e *TrinoScrapper) QuerySqlDefinitions(origCtx context.Context) ([]*scrapper.SqlDefinitionRow, error)
- func (e *TrinoScrapper) QueryTableMetrics(origCtx context.Context, lastMetricsFetchTime time.Time) ([]*scrapper.TableMetricsRow, error)
- func (e *TrinoScrapper) QueryTables(ctx context.Context) ([]*scrapper.TableRow, error)
- func (e *TrinoScrapper) SqlDialect() sqldialect.Dialect
- func (e *TrinoScrapper) ValidateConfiguration(ctx context.Context) ([]string, error)
- type TrinoScrapperConf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetricsStrategy ¶ added in v0.4.3
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 (*TrinoScrapper) SqlDialect ¶
func (e *TrinoScrapper) SqlDialect() sqldialect.Dialect
func (*TrinoScrapper) ValidateConfiguration ¶
func (e *TrinoScrapper) ValidateConfiguration(ctx context.Context) ([]string, error)
type TrinoScrapperConf ¶
Click to show internal directories.
Click to hide internal directories.