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

Function write_encrypted_file

python/pyarrow/tests/parquet/test_encryption.py:97–116  ·  view source on GitHub ↗

Writes an encrypted parquet file based on the provided parameters.

(path, data_table, footer_key_name, col_key_name,
                         footer_key, col_key, encryption_config)

Source from the content-addressed store, hash-verified

95
96
97def write_encrypted_file(path, data_table, footer_key_name, col_key_name,
98 footer_key, col_key, encryption_config):
99 """
100 Writes an encrypted parquet file based on the provided parameters.
101 """
102 # Setup the custom KMS configuration with provided keys
103 custom_kms_conf = {
104 footer_key_name: footer_key.decode("UTF-8"),
105 col_key_name: col_key.decode("UTF-8"),
106 }
107
108 # Setup encryption environment
109 kms_connection_config, crypto_factory = setup_encryption_environment(
110 custom_kms_conf)
111
112 # Write the encrypted parquet file
113 write_encrypted_parquet(path, data_table, encryption_config,
114 kms_connection_config, crypto_factory)
115
116 return kms_connection_config, crypto_factory
117
118
119def test_encrypted_parquet_write_read(tempdir, data_table):

Calls 3

write_encrypted_parquetFunction · 0.85
decodeMethod · 0.45

Tested by

no test coverage detected