Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Liu <[email protected]>
  • Loading branch information
felixscherz and kevinjqliu authored Jan 6, 2025
1 parent 3f63e6c commit 398e2d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyiceberg/catalog/s3tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ 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
# S3 Tables API and then write the new metadata.json to the warehouseLocation associated with the newly
# created S3 Table.
try:
self.s3tables.create_table(
Expand Down
8 changes: 6 additions & 2 deletions tests/catalog/test_s3tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ def table_bucket_arn() -> str:
# in one of the supported regions.

return os.environ["ARN"]
@pytest.fixture
def aws_region() -> str:
import os

return os.environ["AWS_REGION"]

@pytest.fixture
def catalog(table_bucket_arn: str) -> S3TableCatalog:
properties = {"s3tables.table-bucket-arn": table_bucket_arn, "s3tables.region": "us-east-1", "s3.region": "us-east-1"}
def catalog(table_bucket_arn: str, aws_region: str) -> S3TableCatalog:
properties = {"s3tables.table-bucket-arn": table_bucket_arn, "s3tables.region": aws_region}
return S3TableCatalog(name="test_s3tables_catalog", **properties)


Expand Down

0 comments on commit 398e2d7

Please sign in to comment.