Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[feature request] easier API to set table properties  #502

Copy link
Copy link
@kevinjqliu

Description

@kevinjqliu
Issue body actions

Feature Request / Improvement

Background

Currently, there are two ways to set table properties.

  1. in create_table, pass in properties as dictionary

    table = catalog.create_table(random_identifier, table_schema_nested, properties={"format-version": "1"})

  2. using table set_properties transaction, pass in as key/value pair

    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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.