Documentation
¶
Index ¶
- Constants
- func DatabaseIdentifier(database string) table.Identifier
- func TableIdentifier(database string, tableName string) table.Identifier
- type AwsProperties
- type Catalog
- func (c *Catalog) CatalogType() catalog.Type
- func (c *Catalog) CheckNamespaceExists(ctx context.Context, namespace table.Identifier) (bool, error)
- func (c *Catalog) CommitTable(context.Context, *table.Table, []table.Requirement, []table.Update) (table.Metadata, string, error)
- func (c *Catalog) CreateNamespace(ctx context.Context, namespace table.Identifier, props iceberg.Properties) error
- func (c *Catalog) CreateTable(ctx context.Context, identifier table.Identifier, schema *iceberg.Schema, ...) (*table.Table, error)
- func (c *Catalog) DropNamespace(ctx context.Context, namespace table.Identifier) error
- func (c *Catalog) DropTable(ctx context.Context, identifier table.Identifier) error
- func (c *Catalog) ListNamespaces(ctx context.Context, parent table.Identifier) ([]table.Identifier, error)
- func (c *Catalog) ListTables(ctx context.Context, namespace table.Identifier) iter.Seq2[table.Identifier, error]
- func (c *Catalog) LoadNamespaceProperties(ctx context.Context, namespace table.Identifier) (iceberg.Properties, error)
- func (c *Catalog) LoadTable(ctx context.Context, identifier table.Identifier, props iceberg.Properties) (*table.Table, error)
- func (c *Catalog) RenameTable(ctx context.Context, from, to table.Identifier) (*table.Table, error)
- func (c *Catalog) UpdateNamespaceProperties(ctx context.Context, namespace table.Identifier, removals []string, ...) (catalog.PropertiesUpdateSummary, error)
- type Option
Constants ¶
const ( // The ID of the Glue Data Catalog where the tables reside. If none is provided, Glue // automatically uses the caller's AWS account ID by default. // See: https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-catalog-databases.html CatalogIdKey = "glue.id" AccessKeyID = "glue.access-key-id" SecretAccessKey = "glue.secret-access-key" SessionToken = "glue.session-token" Region = "glue.region" Endpoint = "glue.endpoint" MaxRetries = "glue.max-retries" RetryMode = "glue.retry-mode" )
Variables ¶
This section is empty.
Functions ¶
func DatabaseIdentifier ¶
func DatabaseIdentifier(database string) table.Identifier
DatabaseIdentifier returns a database identifier for a Glue database in the format [database].
func TableIdentifier ¶
func TableIdentifier(database string, tableName string) table.Identifier
TableIdentifier returns a glue table identifier for an Iceberg table in the format [database, table].
Types ¶
type AwsProperties ¶
type Catalog ¶
type Catalog struct {
// contains filtered or unexported fields
}
func NewCatalog ¶
NewCatalog creates a new instance of glue.Catalog with the given options.
func (*Catalog) CatalogType ¶
func (*Catalog) CheckNamespaceExists ¶
func (*Catalog) CommitTable ¶
func (*Catalog) CreateNamespace ¶
func (c *Catalog) CreateNamespace(ctx context.Context, namespace table.Identifier, props iceberg.Properties) error
CreateNamespace creates a new Iceberg namespace in the Glue catalog.
func (*Catalog) CreateTable ¶
func (*Catalog) DropNamespace ¶
DropNamespace deletes an Iceberg namespace from the Glue catalog.
func (*Catalog) ListNamespaces ¶
func (c *Catalog) ListNamespaces(ctx context.Context, parent table.Identifier) ([]table.Identifier, error)
ListNamespaces returns a list of Iceberg namespaces from the given Glue catalog.
func (*Catalog) ListTables ¶
func (c *Catalog) ListTables(ctx context.Context, namespace table.Identifier) iter.Seq2[table.Identifier, error]
ListTables returns a list of Iceberg tables in the given Glue database.
The namespace should just contain the Glue database name.
func (*Catalog) LoadNamespaceProperties ¶
func (c *Catalog) LoadNamespaceProperties(ctx context.Context, namespace table.Identifier) (iceberg.Properties, error)
LoadNamespaceProperties loads the properties of an Iceberg namespace from the Glue catalog.
func (*Catalog) LoadTable ¶
func (c *Catalog) LoadTable(ctx context.Context, identifier table.Identifier, props iceberg.Properties) (*table.Table, error)
LoadTable loads a table from the catalog table details.
The identifier should contain the Glue database name, then Glue table name.
func (*Catalog) RenameTable ¶
RenameTable renames an Iceberg table in the Glue catalog.
func (*Catalog) UpdateNamespaceProperties ¶
func (c *Catalog) UpdateNamespaceProperties(ctx context.Context, namespace table.Identifier, removals []string, updates iceberg.Properties, ) (catalog.PropertiesUpdateSummary, error)
UpdateNamespaceProperties updates the properties of an Iceberg namespace in the Glue catalog. The removals list contains the keys to remove, and the updates map contains the keys and values to update.
type Option ¶
type Option func(*options)
func WithAwsConfig ¶
WithAwsConfig sets the AWS configuration for the catalog.
func WithAwsProperties ¶
func WithAwsProperties(props AwsProperties) Option