Skip to content

Commit

Permalink
docs: update documentation for create_table
Browse files Browse the repository at this point in the history
  • Loading branch information
felixscherz committed Jan 6, 2025
1 parent cffee37 commit a6939ea
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pyiceberg/catalog/s3tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ def create_table(

schema: Schema = self._convert_schema_if_needed(schema) # type: ignore

# creating a new table with S3 Tables is a two step process. We first have to create an S3 Table with the
# S3 Tables API and then write the new metadata.json to the warehouseLocaiton associated with the newly
# created S3 Table.
try:
self.s3tables.create_table(
tableBucketARN=self.table_bucket_arn, namespace=namespace, name=table_name, format="ICEBERG"
Expand All @@ -165,7 +168,8 @@ def create_table(
)

io = load_file_io(properties=self.properties, location=metadata_location)
# this triggers unsupported list operation error, setting overwrite=True is a workaround for now
# this triggers unsupported list operation error as S3 Table Buckets only support a subset of the S3 Bucket API,
# setting overwrite=True is a workaround for now since it prevents a call to list_objects
self._write_metadata(metadata, io, metadata_location, overwrite=True)

try:
Expand Down

0 comments on commit a6939ea

Please sign in to comment.