felixscherz commented on issue #1404:
URL:
https://github.com/apache/iceberg-python/issues/1404#issuecomment-2606505572
@soumilshah1995 once #1429 is merged, an example would be:
```python
from pyiceberg.catalog.s3tables import S3TablesCatalog
import pyarrow as pa
table_bucket_arn: str = "..."
aws_region: str = "..."
properties = {"s3tables.warehouse": table_bucket_arn, "s3tables.region":
aws_region}
catalog = S3TablesCatalog(name="s3tables_catalog", **properties)
database_name = "prod"
catalog.create_namespace(namespace=database_name)
pyarrow_table = pa.Table.from_arrays(
[
pa.array([None, "A", "B", "C"]),
pa.array([1, 2, 3, 4]),
pa.array([True, None, False, True]),
pa.array([None, "A", "B", "C"]),
],
schema=pa.schema(
[
pa.field("foo", pa.large_string(), nullable=True),
pa.field("bar", pa.int32(), nullable=False),
pa.field("baz", pa.bool_(), nullable=True),
pa.field("large", pa.large_string(), nullable=True),
]
),
)
identifier = (database_name, "orders")
table = catalog.create_table(identifier=identifier,
schema=pyarrow_table.schema)
table.append(pyarrow_table)
```
I'm currently working on implementing AWS S3 Tables for the moto library
https://github.com/getmoto/moto/pull/8470 so once that is merged, we can
improve the tests and merge #1429
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]