feat(python): Support partitioned tables in sink_iceberg#26864
Open
ldacey wants to merge 1 commit intopola-rs:mainfrom
Open
feat(python): Support partitioned tables in sink_iceberg#26864ldacey wants to merge 1 commit intopola-rs:mainfrom
ldacey wants to merge 1 commit intopola-rs:mainfrom
Conversation
- add _resolve_partition_key to map pyicberg partition transforms to polars expressions for PartitionBy
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #26864 +/- ##
==========================================
+ Coverage 81.00% 81.64% +0.64%
==========================================
Files 1805 1805
Lines 248021 248052 +31
Branches 3132 3140 +8
==========================================
+ Hits 200902 202533 +1631
+ Misses 46313 44713 -1600
Partials 806 806 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Author
|
Is there an issue with the code or a better approach? |
Collaborator
|
We're just not ready for this yet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This extends the work done here: #26799
I have been using
sink_parquetwithPartitionByalong with pyicebergadd_filesin order to get lazy streaming writes to my Iceberg tables. Comparing my code with the committed code above I only had to make a few changes:PartitionByBuckettransforms are not supported due to using murmur3 hashing.I tested this with the simple pytests and a 6 million row table with various partitioning (Month(date), Day(date), Identity(location)) directly to my GCS catalog and to local iceberg tables.
LazyFrame.sink_iceberg#26799 versus my local code to understand the scope (to make sure I would not need to touch Rust code etc)relevant and correct.
@nameexhaustion