Closed
Description
EDIT: this now works, but needs to be cleaned up once we ship a new version of stdlib.
This does not currently work:
const db = await DuckDBClient.of({penguins: FileAttachment("simple-parquet.parquet")});
A work-around is to force the URL to be absolute:
function absoluteFA(FA) {
const {url} = FA;
FA.url = async function() {
return new URL(await url.apply(FA), document.location.href).href;
}
return FA;
}
then call:
const db = await DuckDBClient.of({penguins: absoluteFA(FileAttachment("simple-parquet.parquet"))});
Maybe that could be fixed in stdlib, https://github.com/observablehq/stdlib/blob/301bd60f43b7416ea4a82a297f0dd287bef83410/src/duckdb.js#L174C36-L174C45