Skip to content

Empty iceberg table created with PyIceberg in AWS Glue misses location and schema #435

@zartstrom

Description

@zartstrom

Apache Iceberg version

None

Please describe the bug 🐞

I want to create an empty Iceberg table with PyIceberg in AWS Glue. The snippet below creates the table, but does not show the location and schema information in AWS Glue.
What am I missing?

Missing location

Missing schema

from pyiceberg.catalog import load_catalog
from pyiceberg.schema import Schema
from pyiceberg.types import TimestampType, StringType, NestedField

schema = Schema(
    NestedField(field_id=1, name="datetime", field_type=TimestampType()),
    NestedField(field_id=2, name="job_id", field_type=StringType()),
    NestedField(field_id=3, name="result", field_type=StringType()),
    NestedField(field_id=4, name="description", field_type=StringType()),
)

if __name__ == "__main__":
    catalog = load_catalog(
        "default",
        **{
            "type": "glue",
        },
    )

    catalog.create_table(
        identifier=f"manually_created.my_test_table",
        schema=schema,
        location="s3://my_test_bucket/my_test_table",
    )

with version pyiceberg==0.5.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions