-
Notifications
You must be signed in to change notification settings - Fork 137
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
registerFileHandle and spatial extension? #1793
Comments
I have the same issue with |
Hello everyone, I want to confirm that the issue described is reproducible and occurs 100% of the time under the specified conditions. You can find a detailed example to validate this issue here: https://github.com/malveo/duckdb-wasm-gdal-xlsx When using the https://github.com/malveo/duckdb-wasm-gdal-xlsx/blob/main/public/vanilla/index.html Thank you! 🙏 Best |
@malveo your vanilla example inspired me to come up with this workaround: const blobUrl = URL.createObjectURL(file)
const fakeUrl = window.location.href + "data.xlsx"
await db.registerFileURL(fakeUrl, blobUrl, DuckDBDataProtocol.HTTP, true)
const read_xlsx = await c.query(
`CREATE OR REPLACE TABLE table1 AS SELECT * FROM ST_Read('${fakeUrl}');`
);
URL.revokeObjectURL(blobUrl) |
@nshiab what's the error you're getting? and, are you on the latest duckdb? the |
as of 1.28.1-dev258.0, it seems to work fine with registerFileHandle() |
@ericemc3 I'm able to reproduce the bug in 1.28.1-dev258.0 with registerFileHandle, are you doing something different from malveo? Or did you mean registerFileURL? |
|
Works like a charm with @1.28.1-dev258.0. Thanks, @ericemc3! I was still using 1.28.1-dev106.0, since it's tagged as the latest. |
Thanks for the support! I just tested with release -dev258.0 and followed @ericemc3’s suggestion from https://observablehq.com/d/4cc96a19f57a830d, using registerFileURL with an XLSX file, and I encountered the following error:
check it out here: https://github.com/malveo/duckdb-wasm-gdal-xlsx Am I missing something? |
Hi @malveo! I'm sorry. I don't know why, but it's probably worth opening a new issue. Good luck! |
Hello!
You have great examples showing how to load data from a File handle here: https://duckdb.org/docs/api/wasm/data_ingestion
But this doesn't seem to work with the spatial extension. Here's what I tried to do:
But I get this error:
Thank you! 🙏
Originally posted by @nshiab in #1791
The text was updated successfully, but these errors were encountered: