Help us shape the future of Go! Take the 2026 Go Developer Survey

fabric

package
v0.11.783 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

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

func QuoteIdentifier(identifier string) string

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

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 (BasicOperator) RunTask

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 (c *Config) DriverName() string

func (*Config) GetIngestrURI

func (c *Config) GetIngestrURI() (string, error)

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

func (c *Config) ToDBConnectionURI() string

type DB

type DB struct {
	// contains filtered or unexported fields
}

func NewDB

func NewDB(c *Config) (*DB, error)

func (*DB) BuildTableExistsQuery added in v0.11.677

func (db *DB) BuildTableExistsQuery(tableName string) (string, error)

func (*DB) Close

func (db *DB) Close() error

func (*DB) CreateSchemaIfNotExist added in v0.11.673

func (db *DB) CreateSchemaIfNotExist(ctx context.Context, asset *pipeline.Asset) error

func (*DB) GetColumns added in v0.11.673

func (db *DB) GetColumns(ctx context.Context, databaseName, tableName string) ([]*ansisql.DBColumn, error)

func (*DB) GetColumnsForTable added in v0.11.673

func (db *DB) GetColumnsForTable(ctx context.Context, schemaName, tableName string) ([]*ansisql.DBColumn, error)

func (*DB) GetCurrentDatabase added in v0.11.673

func (db *DB) GetCurrentDatabase(ctx context.Context) (string, error)

func (*DB) GetDatabaseSummary added in v0.11.509

func (db *DB) GetDatabaseSummary(ctx context.Context) (*ansisql.DBDatabase, error)

func (*DB) GetDatabases added in v0.11.707

func (db *DB) GetDatabases(ctx context.Context) ([]string, error)

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 *DB) GetIngestrURI() (string, error)

func (*DB) GetTableSummary added in v0.11.673

func (db *DB) GetTableSummary(ctx context.Context, tableName string, schemaOnly bool) (*diff.TableSummaryResult, error)

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

func (db *DB) Limit(q string, limit int64) string

Limit wraps the query so it returns at most `limit` rows. It preserves the original query verbatim 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. Queries that begin with a CTE are limited via an appended CTE instead of a derived-table wrapper, since T-SQL forbids a WITH clause inside a derived table.

func (*DB) Ping

func (db *DB) Ping(ctx context.Context) error

func (*DB) RunQueryWithoutResult

func (db *DB) RunQueryWithoutResult(ctx context.Context, q *query.Query) error

func (*DB) Select

func (db *DB) Select(ctx context.Context, q *query.Query) ([][]interface{}, error)

func (*DB) SelectWithSchema

func (db *DB) SelectWithSchema(ctx context.Context, queryObj *query.Query) (*query.QueryResult, error)

type MaxCheck

type MaxCheck struct {
	// contains filtered or unexported fields
}

func (*MaxCheck) Check

type MinCheck

type MinCheck struct {
	// contains filtered or unexported fields
}

func (*MinCheck) Check

type NegativeCheck

type NegativeCheck struct {
	// contains filtered or unexported fields
}

func (*NegativeCheck) Check

type NonNegativeCheck

type NonNegativeCheck struct {
	// contains filtered or unexported fields
}

func (*NonNegativeCheck) Check

type NotNullCheck

type NotNullCheck struct {
	// contains filtered or unexported fields
}

func (*NotNullCheck) Check

type PatternCheck

type PatternCheck struct {
	// contains filtered or unexported fields
}

func (*PatternCheck) Check

type PositiveCheck

type PositiveCheck struct {
	// contains filtered or unexported fields
}

func (*PositiveCheck) Check

type RelationshipsCheck added in v0.11.723

type RelationshipsCheck struct {
	// contains filtered or unexported fields
}

func (*RelationshipsCheck) Check added in v0.11.723

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

func (sc *SchemaCreator) CreateSchemaIfNotExist(ctx context.Context, qr schemaQueryRunner, asset *pipeline.Asset) error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL