DuckDB v1.0.0 1f98600c2c
$ cd '/mnt/j/gis/Global/overture/2024_07/theme=addresses/type=address'
$ COUNTRY=CA
$ echo "COPY (
SELECT h3_cell_to_boundary_wkt(
h3_latlng_to_cell(bbox.ymax, bbox.xmax, 5))::geometry geom,
COUNT(*)
FROM read_parquet('*.parquet')
WHERE country = '$COUNTRY'
group by 1
) TO '../../addresses.$COUNTRY.gpkg'
WITH (FORMAT GDAL,
DRIVER 'GPKG',
LAYER_CREATION_OPTIONS 'WRITE_BBOX=YES')" | ~/duckdb
Floating point exception
Using S3 as a source works fine, it's just with a local file that the issue comes up. I'll raise a ticket with DuckDB. duckdb/duckdb-spatial#368
For the JSON issue, scan the whole dataset, it'll be one rogue JSON record. It's unlikely it's in the first 10 records.