Skip to content

Add example demonstrating how Parquet encryption could be configured with KMS integration #16237

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

adamreeve
Copy link

This is a draft PR with a non-working example demonstrating how reading and writing of Parquet files using modular encryption could be supported in DataFusion.

Related to #15216

@adamreeve
Copy link
Author

One thing this example doesn't cover is how users might directly set encryption keys without using a KMS. That could be achieved using the same API and implementing an EncryptionFactory, but I think it would make sense to have separate config options directly corresponding to FileDecryptionProperties and FileEncryptionProperties.

let mut parquet_options = TableParquetOptions::new();
// We specify that we want to use Parquet encryption by setting the identifier of the
// encryption factory to use.
parquet_options.encryption.factory_id = ENCRYPTION_FACTORY_ID.to_owned();
Copy link

@corwinjoy corwinjoy Jun 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be under parquet_options.global... since it affects all columns. And I guess we should figure out if we want a encryption sub-piece for all crypto related options. Maybe call it crypto?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially had it under global but then decided that didn't quite make sense as some of the options might be per-column keys, so moved it to a separate encryption namespace.

And yeah I was using encryption here to include decryption properties too. crypto probably makes more sense, and being shorter to type is nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants