Skip to content

Commit 7642f02

Browse files
committed
docs: update documentation for create_table
1 parent 8ef0015 commit 7642f02

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pyiceberg/catalog/s3tables.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ def create_table(
140140

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

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

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

171175
try:

0 commit comments

Comments
 (0)