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

Function write_encrypted_file

python/pyarrow/tests/parquet/test_encryption.py:104–123  ·  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

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

Calls 3

write_encrypted_parquetFunction · 0.85
decodeMethod · 0.45

Tested by

no test coverage detected