-
Notifications
You must be signed in to change notification settings - Fork 340
Closed
Description
Feature Request / Improvement
Background
Currently, there are two ways to set table properties.
-
in
create_table
, pass inproperties
as dictionary
iceberg-python/tests/catalog/test_sql.py
Line 168 in 29fd42c
table = catalog.create_table(random_identifier, table_schema_nested, properties={"format-version": "1"}) -
using table
set_properties
transaction, pass in as key/value pair
iceberg-python/mkdocs/docs/api.md
Lines 483 to 484 in 29fd42c
with table.transaction() as transaction: transaction.set_properties(abc="def")
With the introduction of TableProperties
, it would be great to make overriding table properties easier.
With the current methods, we can only override table properties during create_table
since this is not valid python:
with table.transaction() as transaction:
transaction.set_properties(TableProperties.PARQUET_ROW_GROUP_SIZE_BYTES=1000)
Proposed solution
Allow set_properties
to take in a dictionary. And also allow the dictionary value to be non-string type (similar to #469)
with table.transaction() as transaction:
transaction.set_properties({TableProperties.PARQUET_ROW_GROUP_SIZE_BYTES: 1000})
Metadata
Metadata
Assignees
Labels
No labels