Documentation
¶
Index ¶
- type OracleQueryLogSchema
- type OracleScrapper
- func (e *OracleScrapper) Capabilities() scrapper.Capabilities
- func (e *OracleScrapper) Close() error
- func (e *OracleScrapper) DialectType() string
- func (e *OracleScrapper) Executor() *dwhexecoracle.OracleExecutor
- func (s *OracleScrapper) FetchQueryLogs(ctx context.Context, from, to time.Time, obfuscator querylogs.QueryObfuscator) (querylogs.QueryLogIterator, error)
- func (e *OracleScrapper) IsPermissionError(err error) bool
- func (e *OracleScrapper) QueryCatalog(ctx context.Context) ([]*scrapper.CatalogColumnRow, error)
- func (e *OracleScrapper) QueryCustomMetrics(ctx context.Context, sql string, args ...any) ([]*scrapper.CustomMetricsRow, error)
- func (e *OracleScrapper) QueryDatabases(ctx context.Context) ([]*scrapper.DatabaseRow, error)
- func (e *OracleScrapper) QuerySegments(ctx context.Context, sql string, args ...any) ([]*scrapper.SegmentRow, error)
- func (e *OracleScrapper) QueryShape(ctx context.Context, sql string) ([]*scrapper.QueryShapeColumn, error)
- func (e *OracleScrapper) QuerySqlDefinitions(ctx context.Context) ([]*scrapper.SqlDefinitionRow, error)
- func (e *OracleScrapper) QueryTableConstraints(ctx context.Context) ([]*scrapper.TableConstraintRow, error)
- func (e *OracleScrapper) QueryTableMetrics(ctx context.Context, lastMetricsFetchTime time.Time) ([]*scrapper.TableMetricsRow, error)
- func (e *OracleScrapper) QueryTables(ctx context.Context, opts ...scrapper.QueryTablesOption) ([]*scrapper.TableRow, error)
- func (e *OracleScrapper) SqlDialect() sqldialect.Dialect
- func (e *OracleScrapper) ValidateConfiguration(ctx context.Context) ([]string, error)
- type OracleScrapperConf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OracleQueryLogSchema ¶ added in v0.12.0
type OracleQueryLogSchema struct {
SqlId string `db:"SQL_ID"`
SqlFulltext *string `db:"SQL_FULLTEXT"`
ParsingSchemaName *string `db:"PARSING_SCHEMA_NAME"`
LastActiveTime *time.Time `db:"LAST_ACTIVE_TIME"`
IntervalStart *time.Time `db:"INTERVAL_START"`
Executions *int64 `db:"EXECUTIONS"`
ElapsedTime *int64 `db:"ELAPSED_TIME"`
CpuTime *int64 `db:"CPU_TIME"`
DiskReads *int64 `db:"DISK_READS"`
BufferGets *int64 `db:"BUFFER_GETS"`
RowsProcessed *int64 `db:"ROWS_PROCESSED"`
CommandType *int64 `db:"COMMAND_TYPE"`
Module *string `db:"MODULE"`
Action *string `db:"ACTION"`
OptimizerCost *int64 `db:"OPTIMIZER_COST"`
Fetches *int64 `db:"FETCHES"`
Sorts *int64 `db:"SORTS"`
}
OracleQueryLogSchema maps columns from V$SQL or DBA_HIST query results. Fields shared between both sources use the same column aliases.
type OracleScrapper ¶
type OracleScrapper struct {
// contains filtered or unexported fields
}
func NewOracleScrapper ¶
func NewOracleScrapper(ctx context.Context, conf *OracleScrapperConf) (*OracleScrapper, error)
func (*OracleScrapper) Capabilities ¶ added in v0.10.6
func (e *OracleScrapper) Capabilities() scrapper.Capabilities
func (*OracleScrapper) Close ¶
func (e *OracleScrapper) Close() error
func (*OracleScrapper) DialectType ¶
func (e *OracleScrapper) DialectType() string
func (*OracleScrapper) Executor ¶ added in v0.12.0
func (e *OracleScrapper) Executor() *dwhexecoracle.OracleExecutor
func (*OracleScrapper) FetchQueryLogs ¶ added in v0.12.0
func (s *OracleScrapper) FetchQueryLogs( ctx context.Context, from, to time.Time, obfuscator querylogs.QueryObfuscator, ) (querylogs.QueryLogIterator, error)
func (*OracleScrapper) IsPermissionError ¶
func (e *OracleScrapper) IsPermissionError(err error) bool
func (*OracleScrapper) QueryCatalog ¶
func (e *OracleScrapper) QueryCatalog(ctx context.Context) ([]*scrapper.CatalogColumnRow, error)
func (*OracleScrapper) QueryCustomMetrics ¶
func (e *OracleScrapper) QueryCustomMetrics(ctx context.Context, sql string, args ...any) ([]*scrapper.CustomMetricsRow, error)
func (*OracleScrapper) QueryDatabases ¶
func (e *OracleScrapper) QueryDatabases(ctx context.Context) ([]*scrapper.DatabaseRow, error)
func (*OracleScrapper) QuerySegments ¶
func (e *OracleScrapper) QuerySegments(ctx context.Context, sql string, args ...any) ([]*scrapper.SegmentRow, error)
func (*OracleScrapper) QueryShape ¶
func (e *OracleScrapper) QueryShape(ctx context.Context, sql string) ([]*scrapper.QueryShapeColumn, error)
func (*OracleScrapper) QuerySqlDefinitions ¶
func (e *OracleScrapper) QuerySqlDefinitions(ctx context.Context) ([]*scrapper.SqlDefinitionRow, error)
func (*OracleScrapper) QueryTableConstraints ¶
func (e *OracleScrapper) QueryTableConstraints(ctx context.Context) ([]*scrapper.TableConstraintRow, error)
func (*OracleScrapper) QueryTableMetrics ¶
func (e *OracleScrapper) QueryTableMetrics(ctx context.Context, lastMetricsFetchTime time.Time) ([]*scrapper.TableMetricsRow, error)
func (*OracleScrapper) QueryTables ¶
func (e *OracleScrapper) QueryTables(ctx context.Context, opts ...scrapper.QueryTablesOption) ([]*scrapper.TableRow, error)
func (*OracleScrapper) SqlDialect ¶
func (e *OracleScrapper) SqlDialect() sqldialect.Dialect
func (*OracleScrapper) ValidateConfiguration ¶
func (e *OracleScrapper) ValidateConfiguration(ctx context.Context) ([]string, error)
type OracleScrapperConf ¶
type OracleScrapperConf struct {
dwhexecoracle.OracleConf
// UseDiagnosticsPack enables use of AWR (Automatic Workload Repository) views
// for query log collection. AWR is part of the Oracle Diagnostics Pack, which
// requires a separate license for Oracle Database Enterprise Edition.
// When false (default), query logs come from V$SQL (no additional license needed).
// V$SQL provides in-memory cached SQL statements that age out under memory pressure.
// When true, query logs come from DBA_HIST_SQLSTAT + DBA_HIST_SQLTEXT which
// provides persistent AWR snapshots (typically hourly, retained for days/weeks).
// Requires Diagnostics Pack license and SELECT ANY DICTIONARY or SELECT_CATALOG_ROLE grant.
UseDiagnosticsPack bool
}
Click to show internal directories.
Click to hide internal directories.