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