Data Import
Reading and Writing Encrypted Files
Using the `PRAGMA add_parquet_key` function, named encryption keys of 128, 192, or 256 bits can be added to a session. These keys are stored in-memory:  
```sql
PRAGMA add_parquet_key('key128', '0123456789112345');
PRAGMA add_parquet_key('key192', '012345678911234501234567');
PRAGMA add_parquet_key('key256', '01234567891123450123456789112345');
```  
#### Writing Encrypted Parquet Files {#docs:data:parquet:encryption::writing-encrypted-parquet-files}  
After specifying the key (e.g., `key256`), files can be encrypted as follows:  
```sql
COPY tbl TO 'tbl.parquet' (ENCRYPTION_CONFIG {footer_key: 'key256'});
```  
#### Reading Encrypted Parquet Files {#docs:data:parquet:encryption::reading-encrypted-parquet-files}  
An encrypted Parquet file using a specific key (e.g., `key256`), can then be read as follows:  
```sql
COPY tbl FROM 'tbl.parquet' (ENCRYPTION_CONFIG {footer_key: 'key256'});
```  
Or:  
```sql
SELECT *
FROM read_parquet('tbl.parquet', encryption_config = {footer_key: 'key256'});
```