Data Import
Examples
Read a single Parquet file:  
```sql
SELECT * FROM 'test.parquet';
```  
Figure out which columns/types are in a Parquet file:  
```sql
DESCRIBE SELECT * FROM 'test.parquet';
```  
Create a table from a Parquet file:  
```sql
CREATE TABLE test AS
SELECT * FROM 'test.parquet';
```  
If the file does not end in `.parquet`, use the `read_parquet` function:  
```sql
SELECT *
FROM read_parquet('test.parq');
```  
Use list parameter to read three Parquet files and treat them as a single table:  
```sql
SELECT *
FROM read_parquet(['file1.parquet', 'file2.parquet', 'file3.parquet']);
```  
Read all files that match the glob pattern:  
```sql
SELECT *
FROM 'test/*.parquet';
```  
Read all files that match the glob pattern, and include a `filename` column:  
That specifies which file each row came from:  
```sql
SELECT *
FROM read_parquet('test/*.parquet', filename = true);
```  
Use a list of globs to read all Parquet files from two specific folders:  
```sql
SELECT *
FROM read_parquet(['folder1/*.parquet', 'folder2/*.parquet']);
```  
Read over HTTPS:  
```sql
SELECT *
FROM read_parquet('https://some.url/some_file.parquet');
```  
Query the [metadata of a Parquet file](#docs:data:parquet:metadata::parquet-metadata):  
```sql
SELECT *
FROM parquet_metadata('test.parquet');
```  
Query the [file metadata of a Parquet file](#docs:data:parquet:metadata::parquet-file-metadata):  
```sql
SELECT *
FROM parquet_file_metadata('test.parquet');
```  
Query the [key-value metadata of a Parquet file](#docs:data:parquet:metadata::parquet-key-value-metadata):  
```sql
SELECT *
FROM parquet_kv_metadata('test.parquet');
```  
Query the [schema of a Parquet file](#docs:data:parquet:metadata::parquet-schema):  
```sql
SELECT *
FROM parquet_schema('test.parquet');
```  
Write the results of a query to a Parquet file using the default compression (Snappy):  
```sql
COPY
(SELECT * FROM tbl)
TO 'result-snappy.parquet'
(FORMAT 'parquet');
```  
Write the results from a query to a Parquet file with specific compression and row group size:  
```sql
COPY
(FROM generate_series(100_000))
TO 'test.parquet'
(FORMAT 'parquet', COMPRESSION 'zstd', ROW_GROUP_SIZE 100_000);
```  
Export the table contents of the entire database as parquet:  
```sql
EXPORT DATABASE 'target_directory' (FORMAT PARQUET);
```