Skip to content

How to write a GeoParquet file? #360

Answered by cholmes
nshiab asked this question in Q&A
Discussion options

You must be logged in to vote

As of DuckDB 1.1 (though use 1.1.1 as it got a bug fix that may help) if you have the spatial extension on (install spatial; load spatial) and your data is geometries then you just need to use the normal Parquet output:

COPY <my_table> TO '<my_output>.parquet' WITH (FORMAT PARQUET);

You can set the compression easily, zstd works great for spatial data (brotli gets even more compressed, but the compression in duckdb seems to take a good bit longer):

COPY <my_table> TO '<my_output>.parquet' WITH (FORMAT PARQUET, COMPRESSION 'zstd');

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nshiab
Comment options

Answer selected by nshiab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants