Skip to content
Blog

Export Parquet

The COPY TO clause can export query results to a Parquet file. It can be combined with a subquery and used as shown below.

COPY (MATCH (u:User) return u.*) TO 'user.parquet' (compression = 'snappy');

The LOAD FROM clause can used to scan the Parquet file and to verify that the export worked:

> LOAD FROM 'user.parquet' RETURN *;
-------------------
| u.name | u.age |
-------------------
| Adam | 30 |
-------------------
| Karissa | 40 |
-------------------
| Zhang | 50 |
-------------------
| Noura | 25 |
-------------------

Available options are:

OptionDefault ValueDescription
COMPRESSIONSNAPPYThe compression format to use (uncompressed, snappy, gzip, lz4 or zstd).