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) CheckTableExists(ctx context.Context, identifier table.Identifier) (bool, error)
- func (c *Catalog) CommitTable(ctx context.Context, identifier table.Identifier, ...) (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) (*table.Table, error)
- func (c *Catalog) RegisterTable(ctx context.Context, identifier table.Identifier, metadataLocation string) (*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 ( // property keys PropsKeyLocation = "location" PropsKeyDescription = "Description" // 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" // Skip archiving old table versions on commits. Recommended for high-frequency // streaming workloads to avoid hitting Glue's archive limits. SkipArchive = "glue.skip-archive" SkipArchiveDefault = true 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) CheckTableExists ¶ added in v0.3.0
CheckTableExists returns if an Iceberg table exists in the Glue catalog.
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 (c *Catalog) CreateTable(ctx context.Context, identifier table.Identifier, schema *iceberg.Schema, opts ...catalog.CreateTableOpt) (*table.Table, error)
CreateTable creates a new Iceberg table in the Glue catalog. This function will create the metadata file in S3 using the catalog and table properties, to determine the bucket and key for the metadata location.
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 ¶
LoadTable loads a table from the catalog table details.
The identifier should contain the Glue database name, then Glue table name.
func (*Catalog) RegisterTable ¶ added in v0.3.0
func (c *Catalog) RegisterTable(ctx context.Context, identifier table.Identifier, metadataLocation string) (*table.Table, error)
RegisterTable registers a new table using existing metadata.
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