Could not get download transportion data using DuckDB in ubuntu #99
-
I have accessed data of Places and Buildings. But, I could not accessed transportation data for the same location. Getting this error: Error: Not implemented Error: Unsupported type for OGR: STRUCT(property VARCHAR, dataset VARCHAR, recordId VARCHAR, confidence DOUBLE)[] here is my query : COPY ( SELECT type, version, level, subtype, road, connectors, id, sources, geometry FROM read_parquet('s3://overturemaps-us-west-2/release/2023-11-14-alpha.0/theme=transportation/type=/', hive_partitioning=1) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The source field is a struct and gdal won't load that , hence the error. Try casting sources as json using |
Beta Was this translation helpful? Give feedback.
-
Hi @ajayvsv -
|
Beta Was this translation helpful? Give feedback.
Hi @ajayvsv -
@mtravis is right you need to cast the array columns to JSON - but it looks like the struct columns are fine. For your query that's both sources and connectors. But more importantly, you'll need to load up the geometry with
ST_GEOMFROMWKB(geometry)
. This worked for me (Note also the change in theread_parquet()
path for this example).