Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(shell.duckdb.org) ST_Read on GeoJson results in GDAL Error - Unexpected character ( #1830

Closed
prusswan opened this issue Aug 28, 2024 · 3 comments

Comments

@prusswan
Copy link

What happens?

ST_Read on a common GeoJson test file results in GDAL Error - Unexpected character (

To Reproduce

SELECT * FROM ST_Read('https://raw.githubusercontent.com/ibis-project/testing-data/master/geojson/zones.geojson');

image

Browser/Environment:

Firefox 126.0.1

Device:

laptop

DuckDB-Wasm Version:

1.28.1-dev258.0

DuckDB-Wasm Deployment:

shell.duckdb.org

Full Name:

Pruss Wan

Affiliation:

none

@szarnyasg
Copy link
Contributor

Hi @prusswan – thanks for opening this. Try loading the httpfs extension as well, this works around the problem for me:

LOAD httpfs;

Of course, the error message could be improved.

@prusswan
Copy link
Author

Hi @prusswan – thanks for opening this. Try loading the httpfs extension as well, this works around the problem for me:

LOAD httpfs;

Of course, the error message could be improved.

Still happens for me. I guess I will try with a more stable WASM version until this gets resolved.

image

@carlopi
Copy link
Collaborator

carlopi commented Sep 27, 2024

I believe this to be solved in the latest duckdb/duckdb-wasm/spatial version.

Please check: https://shell.duckdb.org/#queries=v0,LOAD-spatial~,CREATE-TABLE-T-AS-FROM-ST_Read('https%3A%2F%2Fraw.githubusercontent.com%2Fibis%20project%2Ftesting%20data%2Fmaster%2Fgeojson%2Fzones.geojson')~,DESCRIBE-T~,SELECT-count(*)-FROM-T~

Or the equivalent SQL:

--- httpfs loading is necessary in native, while not working on wasm, we need to better align the two versions here
LOAD httpfs;
LOAD spatial;
CREATE TABLE T AS FROM ST_Read('https://raw.githubusercontent.com/ibis-project/testing-data/master/geojson/zones.geojson');
DESCRIBE T;
SELECT count(*) FROM T;

This is:

DuckDB Web Shell
Database: v1.1.1
Package:  @duckdb/[email protected]

@carlopi carlopi closed this as completed Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants