Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client talks to the OneLake Table API (Unity Catalog / Delta protocol).
func NewClientWithBase ¶
type ColumnChange ¶
type ColumnChange struct {
Name string
Kind ColumnChangeKind
OldType string // target side
NewType string // source side
}
type ColumnChangeKind ¶
type ColumnChangeKind int
const ( ColAdded ColumnChangeKind = iota ColRemoved ColTypeChanged )
type ColumnSchema ¶
ColumnSchema is one column's name, formatted type, nullability and ordinal.
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
Fetcher loads table/column schemas from the OneLake Table API. A single Fetcher carries ONE shared concurrency budget, so concurrent Fetch calls (e.g. the source and target lakehouse sides running at once) stay within one total in-flight limit rather than each opening its own pool and stacking the load on OneLake. Within a Fetch, ListTables runs concurrently across schemas and GetTable runs concurrently across tables — both drawing from that budget.
func NewFetcher ¶
func NewFetcher(api OneLakeTableAPI, concurrency int) *Fetcher
NewFetcher returns a Fetcher whose total in-flight API calls are capped at concurrency (minimum 1).
type LakehouseDiff ¶
LakehouseDiff is one lakehouse's full comparison result. The caller fills Lakehouse and Schemas; Compare produces Tables and Matching.
type OneLakeTableAPI ¶
type OneLakeTableAPI interface {
ListSchemas(wsID, lhID string) ([]string, error)
ListTables(wsID, lhID, schema string) ([]string, error)
GetTable(wsID, lhID, schema, table string) ([]ColumnSchema, error)
}
OneLakeTableAPI is the read-only metadata surface schemacompare needs.
type TableChangeKind ¶
type TableChangeKind int
const ( TableNew TableChangeKind = iota // only in source TableRemoved // only in target TableChanged // exists both, columns differ )
type TableDiff ¶
type TableDiff struct {
Schema string
Table string
Kind TableChangeKind
Columns []ColumnChange // populated when Kind == TableChanged
}
type TableSchema ¶
type TableSchema struct {
Schema string
Table string
Columns map[string]ColumnSchema
}
TableSchema is one table's columns keyed by column name.