Documentation
¶
Index ¶
- func NewColumnCheckOperator(manager config.ConnectionGetter) *ansisql.ColumnCheckOperator
- func NewMaterializer(fullRefresh bool) *pipeline.Materializer
- func QuoteIdentifier(identifier string) string
- type AcceptedValuesCheck
- type BasicOperator
- type Config
- type DB
- func (db *DB) BuildTableExistsQuery(tableName string) (string, error)
- func (db *DB) Close() error
- func (db *DB) CreateSchemaIfNotExist(ctx context.Context, asset *pipeline.Asset) error
- func (db *DB) GetColumns(ctx context.Context, databaseName, tableName string) ([]*ansisql.DBColumn, error)
- func (db *DB) GetColumnsForTable(ctx context.Context, schemaName, tableName string) ([]*ansisql.DBColumn, error)
- func (db *DB) GetCurrentDatabase(ctx context.Context) (string, error)
- func (db *DB) GetDatabaseSummary(ctx context.Context) (*ansisql.DBDatabase, error)
- func (db *DB) GetDatabases(ctx context.Context) ([]string, error)
- func (db *DB) GetIngestrURI() (string, error)
- func (db *DB) GetTableSummary(ctx context.Context, tableName string, schemaOnly bool) (*diff.TableSummaryResult, error)
- func (db *DB) GetTablesWithSchemas(ctx context.Context, databaseName string) (map[string][]string, error)
- func (db *DB) Limit(query string, limit int64) string
- func (db *DB) Ping(ctx context.Context) error
- func (db *DB) RunQueryWithoutResult(ctx context.Context, q *query.Query) error
- func (db *DB) Select(ctx context.Context, q *query.Query) ([][]interface{}, error)
- func (db *DB) SelectWithSchema(ctx context.Context, queryObj *query.Query) (*query.QueryResult, error)
- type MaxCheck
- type MinCheck
- type NegativeCheck
- type NonNegativeCheck
- type NotNullCheck
- type PatternCheck
- type PositiveCheck
- type SchemaCreator
- type SparkConnectionGetter
- type UniqueCheck
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewColumnCheckOperator ¶
func NewColumnCheckOperator(manager config.ConnectionGetter) *ansisql.ColumnCheckOperator
func NewMaterializer ¶
func NewMaterializer(fullRefresh bool) *pipeline.Materializer
func QuoteIdentifier ¶
QuoteIdentifier quotes a Fabric identifier using square brackets. Fabric is case-sensitive, so proper quoting is important.
Types ¶
type AcceptedValuesCheck ¶
type AcceptedValuesCheck struct {
// contains filtered or unexported fields
}
func (*AcceptedValuesCheck) Check ¶
func (c *AcceptedValuesCheck) Check(ctx context.Context, ti *scheduler.ColumnCheckInstance) error
type BasicOperator ¶
type BasicOperator struct {
// contains filtered or unexported fields
}
func NewBasicOperator ¶
func NewBasicOperator(conn config.ConnectionGetter, extractor query.QueryExtractor, materializer materializer, parser *sqlparser.SQLParser) *BasicOperator
func (BasicOperator) GetConnection ¶
func (o BasicOperator) GetConnection() (config.ConnectionGetter, bool)
func (BasicOperator) Run ¶
func (o BasicOperator) Run(ctx context.Context, ti scheduler.TaskInstance) error
type Config ¶
type Config struct {
Username string
Password string
Host string
Port int
Database string
Options string
UseAzureDefaultCredential bool
ClientID string
ClientSecret string
TenantID string
}
func (*Config) DriverName ¶
func (*Config) GetIngestrURI ¶
GetIngestrURI builds the URI ingestr expects for a Microsoft Fabric Warehouse source/destination. Fabric only supports Microsoft Entra ID authentication, so a service-principal URI is produced when client credentials are set, falling back to ActiveDirectoryDefault when use_azure_default_credential is enabled. SQL username/password auth is rejected because Fabric Warehouse has no such login.
fabric://<client_id>:<client_secret>@<host>:<port>/<database>?tenant_id=<tenant_id>
func (*Config) ToDBConnectionURI ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) BuildTableExistsQuery ¶ added in v0.11.677
func (*DB) CreateSchemaIfNotExist ¶ added in v0.11.673
func (*DB) GetColumns ¶ added in v0.11.673
func (*DB) GetColumnsForTable ¶ added in v0.11.673
func (*DB) GetCurrentDatabase ¶ added in v0.11.673
func (*DB) GetDatabaseSummary ¶ added in v0.11.509
func (*DB) GetDatabases ¶ added in v0.11.707
GetDatabases returns the databases available to the connection. A Fabric connection is scoped to a single warehouse (there is no cross-warehouse USE), so the only database we can enumerate is the configured one.
func (*DB) GetIngestrURI ¶
func (*DB) GetTableSummary ¶ added in v0.11.673
func (*DB) GetTablesWithSchemas ¶ added in v0.11.707
func (db *DB) GetTablesWithSchemas(ctx context.Context, databaseName string) (map[string][]string, error)
GetTablesWithSchemas returns the tables of the warehouse grouped by schema, which lets the extension render a schema level in the connections tree.
func (*DB) Limit ¶ added in v0.11.710
Limit wraps the query so it returns at most `limit` rows. It preserves the original query verbatim inside a derived table rather than rewriting it, which matters on Fabric's case-sensitive collation where a parser round-trip would otherwise lowercase column aliases and break the outer references.
func (*DB) RunQueryWithoutResult ¶
func (*DB) SelectWithSchema ¶
type NegativeCheck ¶
type NegativeCheck struct {
// contains filtered or unexported fields
}
func (*NegativeCheck) Check ¶
func (c *NegativeCheck) Check(ctx context.Context, ti *scheduler.ColumnCheckInstance) error
type NonNegativeCheck ¶
type NonNegativeCheck struct {
// contains filtered or unexported fields
}
func (*NonNegativeCheck) Check ¶
func (c *NonNegativeCheck) Check(ctx context.Context, ti *scheduler.ColumnCheckInstance) error
type NotNullCheck ¶
type NotNullCheck struct {
// contains filtered or unexported fields
}
func (*NotNullCheck) Check ¶
func (c *NotNullCheck) Check(ctx context.Context, ti *scheduler.ColumnCheckInstance) error
type PatternCheck ¶
type PatternCheck struct {
// contains filtered or unexported fields
}
func (*PatternCheck) Check ¶
func (c *PatternCheck) Check(ctx context.Context, ti *scheduler.ColumnCheckInstance) error
type PositiveCheck ¶
type PositiveCheck struct {
// contains filtered or unexported fields
}
func (*PositiveCheck) Check ¶
func (c *PositiveCheck) Check(ctx context.Context, ti *scheduler.ColumnCheckInstance) error
type SchemaCreator ¶ added in v0.11.673
type SchemaCreator struct {
// contains filtered or unexported fields
}
func NewSchemaCreator ¶ added in v0.11.673
func NewSchemaCreator(currentDatabase ...string) *SchemaCreator
func (*SchemaCreator) CreateSchemaIfNotExist ¶ added in v0.11.673
type SparkConnectionGetter ¶ added in v0.11.708
type SparkConnectionGetter struct {
// contains filtered or unexported fields
}
SparkConnectionGetter resolves a Fabric connection as a Spark client while leaving the connection manager's regular Fabric/TDS client untouched.
func NewSparkConnectionGetter ¶ added in v0.11.708
func NewSparkConnectionGetter(connections config.ConnectionDetailsGetter) *SparkConnectionGetter
func (*SparkConnectionGetter) GetConnection ¶ added in v0.11.708
func (g *SparkConnectionGetter) GetConnection(name string) any
GetConnection implements config.ConnectionGetter. Callers that support spark.ClientResolver use ResolveSparkClient directly and retain configuration errors; generic check runners receive nil when the Fabric Spark configuration is invalid.
func (*SparkConnectionGetter) ResolveSparkClient ¶ added in v0.11.708
func (g *SparkConnectionGetter) ResolveSparkClient(ctx context.Context, name string) (*spark.Client, error)
ResolveSparkClient builds and caches the Spark client derived from a Fabric connection's shared Entra credentials and Lakehouse coordinates.
type UniqueCheck ¶
type UniqueCheck struct {
// contains filtered or unexported fields
}
func (*UniqueCheck) Check ¶
func (c *UniqueCheck) Check(ctx context.Context, ti *scheduler.ColumnCheckInstance) error