Documentation
¶
Index ¶
- type Executor
- type RedshiftQueryLogSchema
- type RedshiftScrapper
- func (e *RedshiftScrapper) Close() error
- func (e *RedshiftScrapper) DialectType() string
- func (e *RedshiftScrapper) Executor() *dwhexecredshift.RedshiftExecutor
- func (s *RedshiftScrapper) FetchQueryLogs(ctx context.Context, from, to time.Time, obfuscator querylogs.QueryObfuscator) (querylogs.QueryLogIterator, error)
- func (e *RedshiftScrapper) IsPermissionError(err error) bool
- func (e *RedshiftScrapper) QueryCatalog(ctx context.Context) ([]*scrapper.CatalogColumnRow, error)
- func (e *RedshiftScrapper) QueryCustomMetrics(ctx context.Context, sql string, args ...any) ([]*scrapper.CustomMetricsRow, error)
- func (e *RedshiftScrapper) QueryDatabases(ctx context.Context) ([]*scrapper.DatabaseRow, error)
- func (e *RedshiftScrapper) QuerySegments(ctx context.Context, sql string, args ...any) ([]*scrapper.SegmentRow, error)
- func (e *RedshiftScrapper) QuerySqlDefinitions(ctx context.Context) ([]*scrapper.SqlDefinitionRow, error)
- func (e *RedshiftScrapper) QueryTableMetrics(ctx context.Context, lastMetricsFetchTime time.Time) ([]*scrapper.TableMetricsRow, error)
- func (e *RedshiftScrapper) QueryTables(ctx context.Context) ([]*scrapper.TableRow, error)
- func (e *RedshiftScrapper) SqlDialect() sqldialect.Dialect
- func (e *RedshiftScrapper) ValidateConfiguration(ctx context.Context) ([]string, error)
- type RedshiftScrapperConf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedshiftQueryLogSchema ¶
type RedshiftQueryLogSchema struct {
UserId *int64 `db:"user_id"`
QueryId int64 `db:"query_id"`
QueryLabel *string `db:"query_label"`
TransactionId *int64 `db:"transaction_id"`
SessionId *int64 `db:"session_id"`
DatabaseName *string `db:"database_name"`
QueryType *string `db:"query_type"`
Status *string `db:"status"`
ResultCacheHit *bool `db:"result_cache_hit"`
StartTime *time.Time `db:"start_time"`
EndTime *time.Time `db:"end_time"`
ElapsedTime *int64 `db:"elapsed_time"`
QueueTime *int64 `db:"queue_time"`
ExecutionTime *int64 `db:"execution_time"`
ErrorMessage *string `db:"error_message"`
ReturnedRows *int64 `db:"returned_rows"`
ReturnedBytes *int64 `db:"returned_bytes"`
QueryText *string `db:"query_text"`
RedshiftVersion *string `db:"redshift_version"`
UsageLimit *string `db:"usage_limit"`
ComputeType *string `db:"compute_type"`
CompileTime *int64 `db:"compile_time"`
PlanningTime *int64 `db:"planning_time"`
LockWaitTime *int64 `db:"lock_wait_time"`
ServiceClassId *int64 `db:"service_class_id"`
ServiceClassName *string `db:"service_class_name"`
QueryPriority *string `db:"query_priority"`
ShortQueryAccelerated *bool `db:"short_query_accelerated"`
GenericQueryHash *string `db:"generic_query_hash"`
UserQueryHash *string `db:"user_query_hash"`
}
type RedshiftScrapper ¶
type RedshiftScrapper struct {
// contains filtered or unexported fields
}
func NewRedshiftScrapper ¶
func NewRedshiftScrapper(ctx context.Context, conf *RedshiftScrapperConf) (*RedshiftScrapper, error)
func (*RedshiftScrapper) Close ¶
func (e *RedshiftScrapper) Close() error
func (*RedshiftScrapper) DialectType ¶ added in v0.1.8
func (e *RedshiftScrapper) DialectType() string
func (*RedshiftScrapper) Executor ¶
func (e *RedshiftScrapper) Executor() *dwhexecredshift.RedshiftExecutor
func (*RedshiftScrapper) FetchQueryLogs ¶
func (s *RedshiftScrapper) FetchQueryLogs(ctx context.Context, from, to time.Time, obfuscator querylogs.QueryObfuscator) (querylogs.QueryLogIterator, error)
func (*RedshiftScrapper) IsPermissionError ¶ added in v0.1.1
func (e *RedshiftScrapper) IsPermissionError(err error) bool
func (*RedshiftScrapper) QueryCatalog ¶
func (e *RedshiftScrapper) QueryCatalog(ctx context.Context) ([]*scrapper.CatalogColumnRow, error)
func (*RedshiftScrapper) QueryCustomMetrics ¶
func (e *RedshiftScrapper) QueryCustomMetrics(ctx context.Context, sql string, args ...any) ([]*scrapper.CustomMetricsRow, error)
func (*RedshiftScrapper) QueryDatabases ¶
func (e *RedshiftScrapper) QueryDatabases(ctx context.Context) ([]*scrapper.DatabaseRow, error)
func (*RedshiftScrapper) QuerySegments ¶
func (e *RedshiftScrapper) QuerySegments(ctx context.Context, sql string, args ...any) ([]*scrapper.SegmentRow, error)
func (*RedshiftScrapper) QuerySqlDefinitions ¶
func (e *RedshiftScrapper) QuerySqlDefinitions(ctx context.Context) ([]*scrapper.SqlDefinitionRow, error)
func (*RedshiftScrapper) QueryTableMetrics ¶
func (e *RedshiftScrapper) QueryTableMetrics(ctx context.Context, lastMetricsFetchTime time.Time) ([]*scrapper.TableMetricsRow, error)
func (*RedshiftScrapper) QueryTables ¶
func (*RedshiftScrapper) SqlDialect ¶ added in v0.1.8
func (e *RedshiftScrapper) SqlDialect() sqldialect.Dialect
func (*RedshiftScrapper) ValidateConfiguration ¶
func (e *RedshiftScrapper) ValidateConfiguration(ctx context.Context) ([]string, error)
type RedshiftScrapperConf ¶
type RedshiftScrapperConf struct {
dwhexecredshift.RedshiftConf
FreshnessFromQueryLogs bool
}
Click to show internal directories.
Click to hide internal directories.