SQL
Examples
Export the database to the target directory 'target_directory' as CSV files:  
```sql
EXPORT DATABASE 'target_directory';
```  
Export to directory 'target_directory', using the given options for the CSV serialization:  
```sql
EXPORT DATABASE 'target_directory' (FORMAT CSV, DELIMITER '|');
```  
Export to directory 'target_directory', tables serialized as Parquet:  
```sql
EXPORT DATABASE 'target_directory' (FORMAT PARQUET);
```  
Export to directory 'target_directory', tables serialized as Parquet, compressed with ZSTD, with a row_group_size of 100,000:  
```sql
EXPORT DATABASE 'target_directory' (
FORMAT PARQUET,
COMPRESSION ZSTD,
ROW_GROUP_SIZE 100_000
);
```  
Reload the database again:  
```sql
IMPORT DATABASE 'source_directory';
```  
Alternatively, use a `PRAGMA`:  
```sql
PRAGMA import_database('source_directory');
```  
For details regarding the writing of Parquet files, see the [Parquet Files page in the Data Import section](#docs:data:parquet:overview::writing-to-parquet-files) and the [`COPY` Statement page](#docs:sql:statements:copy).