Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoSuchTable is returned when a table does not exist in the catalog. ErrNoSuchTable = errors.New("table does not exist") ErrNoSuchNamespace = errors.New("namespace does not exist") ErrNamespaceAlreadyExists = errors.New("namespace already exists") )
View Source
var (
ErrorTableNotFound = fmt.Errorf("table not found")
)
Functions ¶
func NamespaceFromIdent ¶
func NamespaceFromIdent(ident table.Identifier) table.Identifier
func NewIcebucket ¶
NewIcebucket creates a new icebucket with the given prefix and bucket. The warehouseURI is used to strip the full path of the data warehouse from the object name.
func TableNameFromIdent ¶
func TableNameFromIdent(ident table.Identifier) string
Types ¶
type Catalog ¶
type Catalog interface { // CatalogType returns the type of the catalog. CatalogType() CatalogType // ListTables returns a list of table identifiers in the catalog, with the returned // identifiers containing the information required to load the table via that catalog. ListTables(ctx context.Context, namespace table.Identifier) ([]table.Identifier, error) // LoadTable loads a table from the catalog and returns a Table with the metadata. LoadTable(ctx context.Context, identifier table.Identifier, props iceberg.Properties) (table.Table, error) // DropTable tells the catalog to drop the table entirely DropTable(ctx context.Context, identifier table.Identifier) error // RenameTable tells the catalog to rename a given table by the identifiers // provided, and then loads and returns the destination table RenameTable(ctx context.Context, from, to table.Identifier) (table.Table, error) // ListNamespaces returns the list of available namespaces, optionally filtering by a // parent namespace ListNamespaces(ctx context.Context, parent table.Identifier) ([]table.Identifier, error) // CreateNamespace tells the catalog to create a new namespace with the given properties CreateNamespace(ctx context.Context, namespace table.Identifier, props iceberg.Properties) error // DropNamespace tells the catalog to drop the namespace and all tables in that namespace DropNamespace(ctx context.Context, namespace table.Identifier) error // LoadNamespaceProperties returns the current properties in the catalog for // a given namespace LoadNamespaceProperties(ctx context.Context, namespace table.Identifier) (iceberg.Properties, error) // UpdateNamespaceProperties allows removing, adding, and/or updating properties of a namespace UpdateNamespaceProperties(ctx context.Context, namespace table.Identifier, removals []string, updates iceberg.Properties) (PropertiesUpdateSummary, error) // CreateTable tells the catalog to create a new table with the given schema and properties CreateTable(ctx context.Context, location string, schema *iceberg.Schema, props iceberg.Properties, options ...TableOption) (table.Table, error) }
Catalog for iceberg table operations like create, drop, load, list and others.
type CatalogType ¶
type CatalogType string
const ( REST CatalogType = "rest" Hive CatalogType = "hive" Glue CatalogType = "glue" DynamoDB CatalogType = "dynamodb" SQL CatalogType = "sql" Hadoop CatalogType = "hadoop" )
type PropertiesUpdateSummary ¶
type TableOption ¶
type TableOption func(*tableOptions)
func WithPartitionSpec ¶
func WithPartitionSpec(spec iceberg.PartitionSpec) TableOption
Click to show internal directories.
Click to hide internal directories.