MCPcopy Create free account
hub / github.com/apache/arrow / write_encrypted_parquet

Function write_encrypted_parquet

python/pyarrow/tests/parquet/test_encryption.py:182–194  ·  view source on GitHub ↗
(path, table, encryption_config,
                            kms_connection_config, crypto_factory)

Source from the content-addressed store, hash-verified

180
181
182def write_encrypted_parquet(path, table, encryption_config,
183 kms_connection_config, crypto_factory):
184 if encryption_config.internal_key_material:
185 file_encryption_properties = crypto_factory.file_encryption_properties(
186 kms_connection_config, encryption_config)
187 else:
188 file_encryption_properties = crypto_factory.file_encryption_properties(
189 kms_connection_config, encryption_config, path)
190 assert file_encryption_properties is not None
191 with pq.ParquetWriter(
192 path, table.schema,
193 encryption_properties=file_encryption_properties) as writer:
194 writer.write_table(table)
195
196
197def read_encrypted_parquet(path, decryption_config,

Calls 1

write_tableMethod · 0.45

Tested by

no test coverage detected