Documentation
¶
Index ¶
- func GetObjectNameFromFqn(fqn string) string
- func ParseCreateStatementsPerObject(ctx context.Context, ddls string) (map[string]string, error)
- func QuoteLiteral(literal string) string
- func UnQuote(key string) string
- type DatabaseAndSchema
- type DbDesc
- type ShareDesc
- type ShareObject
- type ShowStreamsRow
- type SnowflakeScrapper
- func (e *SnowflakeScrapper) Close() error
- func (e *SnowflakeScrapper) DialectType() string
- func (e *SnowflakeScrapper) Executor() *dwhexecsnowflake.SnowflakeExecutor
- func (e *SnowflakeScrapper) GetExistingDbs(ctx context.Context) ([]*DbDesc, error)
- func (e *SnowflakeScrapper) IsPermissionError(err error) bool
- func (e *SnowflakeScrapper) QueryCatalog(origCtx context.Context) ([]*scrapper.CatalogColumnRow, error)
- func (e *SnowflakeScrapper) QueryCustomMetrics(ctx context.Context, sql string, args ...any) ([]*scrapper.CustomMetricsRow, error)
- func (e *SnowflakeScrapper) QueryDatabases(ctx context.Context) ([]*scrapper.DatabaseRow, error)
- func (e *SnowflakeScrapper) QuerySegments(ctx context.Context, sql string, args ...any) ([]*scrapper.SegmentRow, error)
- func (e *SnowflakeScrapper) QuerySqlDefinitions(origCtx context.Context) ([]*scrapper.SqlDefinitionRow, error)
- func (e *SnowflakeScrapper) QueryTableMetrics(origCtx context.Context, lastMetricsFetchTime time.Time) ([]*scrapper.TableMetricsRow, error)
- func (e *SnowflakeScrapper) QueryTables(origCtx context.Context) ([]*scrapper.TableRow, error)
- func (e *SnowflakeScrapper) SqlDialect() sqldialect.Dialect
- func (e *SnowflakeScrapper) ValidateConfiguration(ctx context.Context) ([]string, error)
- type SnowflakeScrapperConf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetObjectNameFromFqn ¶ added in v0.4.21
func ParseCreateStatementsPerObject ¶ added in v0.4.21
func QuoteLiteral ¶
Types ¶
type DatabaseAndSchema ¶ added in v0.4.21
type DbDesc ¶
type ShareObject ¶
type ShareObject struct {
}
type ShowStreamsRow ¶ added in v0.4.15
type ShowStreamsRow struct {
// CreatedOn is the timestamp when the stream was created
CreatedOn string `db:"created_on"`
// Name is the name of the stream
Name string `db:"name"`
// DatabaseName is the database containing the stream
DatabaseName string `db:"database_name"`
// SchemaName is the schema containing the stream
SchemaName string `db:"schema_name"`
// Owner is the owner of the stream
Owner string `db:"owner"`
// Comment is the comment/description for the stream
Comment string `db:"comment"`
// TableName is the name of the source table the stream tracks
TableName string `db:"table_name"`
// SourceType is the type of source object (Table, View, etc.)
SourceType string `db:"source_type"`
// BaseTables lists the base tables the stream tracks
BaseTables string `db:"base_tables"`
// Type is the stream type (DELTA, etc.)
Type string `db:"type"`
// Stale indicates whether the stream is stale (true/false)
Stale string `db:"stale"`
// Mode is the stream mode: DEFAULT (standard/delta), APPEND_ONLY, or INSERT_ONLY
Mode string `db:"mode"`
// StaleAfter is the timestamp when the stream becomes stale
StaleAfter string `db:"stale_after"`
// InvalidReason provides the reason if the stream is invalid
InvalidReason string `db:"invalid_reason"`
// OwnerRoleType is the type of owner role
OwnerRoleType string `db:"owner_role_type"`
}
ShowStreamsRow represents the structure of a row returned by SHOW STREAMS command
type SnowflakeScrapper ¶
type SnowflakeScrapper struct {
// contains filtered or unexported fields
}
func NewSnowflakeScrapper ¶
func NewSnowflakeScrapper(ctx context.Context, conf *SnowflakeScrapperConf) (*SnowflakeScrapper, error)
func (*SnowflakeScrapper) Close ¶
func (e *SnowflakeScrapper) Close() error
func (*SnowflakeScrapper) DialectType ¶ added in v0.1.8
func (e *SnowflakeScrapper) DialectType() string
func (*SnowflakeScrapper) Executor ¶
func (e *SnowflakeScrapper) Executor() *dwhexecsnowflake.SnowflakeExecutor
func (*SnowflakeScrapper) GetExistingDbs ¶
func (e *SnowflakeScrapper) GetExistingDbs(ctx context.Context) ([]*DbDesc, error)
func (*SnowflakeScrapper) IsPermissionError ¶ added in v0.1.1
func (e *SnowflakeScrapper) IsPermissionError(err error) bool
func (*SnowflakeScrapper) QueryCatalog ¶
func (e *SnowflakeScrapper) QueryCatalog(origCtx context.Context) ([]*scrapper.CatalogColumnRow, error)
func (*SnowflakeScrapper) QueryCustomMetrics ¶
func (e *SnowflakeScrapper) QueryCustomMetrics(ctx context.Context, sql string, args ...any) ([]*scrapper.CustomMetricsRow, error)
func (*SnowflakeScrapper) QueryDatabases ¶
func (e *SnowflakeScrapper) QueryDatabases(ctx context.Context) ([]*scrapper.DatabaseRow, error)
func (*SnowflakeScrapper) QuerySegments ¶
func (e *SnowflakeScrapper) QuerySegments(ctx context.Context, sql string, args ...any) ([]*scrapper.SegmentRow, error)
func (*SnowflakeScrapper) QuerySqlDefinitions ¶
func (e *SnowflakeScrapper) QuerySqlDefinitions(origCtx context.Context) ([]*scrapper.SqlDefinitionRow, error)
func (*SnowflakeScrapper) QueryTableMetrics ¶
func (e *SnowflakeScrapper) QueryTableMetrics(origCtx context.Context, lastMetricsFetchTime time.Time) ([]*scrapper.TableMetricsRow, error)
func (*SnowflakeScrapper) QueryTables ¶
func (*SnowflakeScrapper) SqlDialect ¶ added in v0.1.8
func (e *SnowflakeScrapper) SqlDialect() sqldialect.Dialect
func (*SnowflakeScrapper) ValidateConfiguration ¶
func (e *SnowflakeScrapper) ValidateConfiguration(ctx context.Context) ([]string, error)
type SnowflakeScrapperConf ¶
type SnowflakeScrapperConf struct {
dwhexecsnowflake.SnowflakeConf
NoGetDll bool
AccountUsageDb *string
}
func (*SnowflakeScrapperConf) UpperDatabasesLiteral ¶
func (c *SnowflakeScrapperConf) UpperDatabasesLiteral() string
FIXME: I couldn't make it work with `foo IN (?)` binding, so I'm using this
Click to show internal directories.
Click to hide internal directories.