Data Import
Examples
Read data from a Hive partitioned data set:  
```sql
SELECT *
FROM read_parquet('orders/*/*/*.parquet', hive_partitioning = true);
```  
Write a table to a Hive partitioned data set:  
```sql
COPY orders
TO 'orders' (FORMAT PARQUET, PARTITION_BY (year, month));
```  
Note that the `PARTITION_BY` options cannot use expressions. You can produce columns on the fly using the following syntax:  
```sql
COPY (SELECT *, year(timestamp) AS year, month(timestamp) AS month FROM services)
TO 'test' (PARTITION_BY (year, month));
```  
When reading, the partition columns are read from the directory structure and
can be can be included or excluded depending on the `hive_partitioning` parameter.  
```sql
FROM read_parquet('test/*/*/*.parquet', hive_partitioning = true);  -- will include year, month partition columns
FROM read_parquet('test/*/*/*.parquet', hive_partitioning = false); -- will not include year, month columns
```