-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: public method to get partitions for DeltaTable (#2671) #2816
Conversation
3779425
to
4c9edf3
Compare
How does this work if partition is a date or a datetime? Would be nice with a test for this |
Head branch was pushed to by a user without write access
Thanks for the suggestion @thomasfrederikhoeck! Have added a test for a date partitioned table in this commit. |
226c671
to
d5863d2
Compare
Nice! 👍🏻 |
This adds a public method `partitions()` to the `DeltaTable` class to get properly formatted partitions (list of dicts) for the table. Also provides an option to return partitions as a list of tuples, and proxies the partition filters to rust `get_active_partitions()`. This also adds supporting tests for this feature.
d5863d2
to
125b7dd
Compare
Description
This adds a public method
partitions()
to theDeltaTable
class to get properly formatted partitions (list of dicts) for the table. Also provides an option to return partitions as a list of tuples, and proxies the partition filters to rustget_active_partitions()
.This also adds supporting tests for this feature.
Related Issue(s)
SHOW PARTITIONS
in the Python API #2671Documentation
Documentation included in method's docstring.