apache / iceberg-python

Apache PyIceberg
https://py.iceberg.apache.org/
Apache License 2.0
472 stars 174 forks source link

show partition values #1094

Closed carcmarc closed 2 months ago

carcmarc commented 2 months ago

Feature Request / Improvement

Currently with Iceberg on Spark, "select table.partitions" will return all partition values of an Iceberg table. The PartitionFieldSummary in the ManifestFile only shows lower and upper bound values per snapshot. Is it possible to add such a feature to be able to list all partition values?

sungwy commented 2 months ago

Hi @carcmarc , thank you for raising this issue!

I believe we already have this feature implemented through its inspect tables. Given that you have access to a table table in your PyIceberg application, you can invoke table.inspect.partitions() to retrieve all of the partition values that the table has.

Could you let us know if that satisfies your use case?

Here's our API documentation about this feature https://py.iceberg.apache.org/api/#partitions

carcmarc commented 2 months ago

Thank you!