-
Notifications
You must be signed in to change notification settings - Fork 342
Add support for Pyarrow filesystem specific properties #2251
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
base: main
Are you sure you want to change the base?
Conversation
Thank you for the PR! This is a great way to unblock end users from configuring the different file systems. Instead of allowlisting each property individually, for each file system implementation constructor, this will allow us to pass args to the file system constructor. We should verify that the implementation does not conflict with existing properties. For example, |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
for more information, see https://pre-commit.ci
@@ -83,3 +84,46 @@ def get_header_properties( | |||
) -> Properties: | |||
header_prefix_len = len(HEADER_PREFIX) | |||
return {key[header_prefix_len:]: value for key, value in properties.items() if key.startswith(HEADER_PREFIX)} | |||
|
|||
|
|||
def properties_with_prefix( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@geruh and i chatted offline about this PR and aligned on this approach. I love that we have so many unit/integration tests, makes me feel confident about this refactor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I approve
Sorry for jumping in so late here, I was out touching grass. While I see what we're trying to achieve here, and provide flexibility to the user, I think it comes at a cost. First of all, the most obivous one; it creates multiple paths to set the same configuration, which might be confusing for new users. That said, the intended of allow-listing the configuration is an effort to consolidate the configuration accross implementations, but also across FileIO's. For example, I think the main question here is, to what extend we want to try to hide the implementation behind the FileIO, or do we want to expose the implementation details to the end-users. I'm leaning towards the first, but curious what others' think. |
closes #2247
Rationale for this change
Add support for PyArrow filesystem specific properties allowing users to pass properties directly to the underlying PyArrow filesystem implementations (e.g.
S3FileSystem
,GcsFileSystem
,AzureFileSystem
, etc.) without requiring mapping support in PyIceberg.Since Pyarrow is a compiled implementation, it won't soft ignore extra parameters making this functionality pretty tedious. BUt now depending on the file systems the properties can be passed through to Pyarrow and interpreted there directly.
Supported filesystems:
Docs:

Are these changes tested?
Added tests and tested locally with S3
Are there any user-facing changes?
Yes new capabilities, updated docs