Replies: 1 comment 4 replies
-
There are several inconsistencies in your code snippet that could be causing the problem:
Here’s a complete snippet that works for me: ```js
const response = await fetch("https://observablehq.com/framework/_file/lib/flights-200k.eedcb010.arrow");
const buffer = await response.arrayBuffer();
const table = await Arrow.tableFromIPC(buffer);
const db = await DuckDBClient.of({flights: table});
``` You can then query your database and display the results like so: ```js
const results = await db.sql`SELECT * FROM flights`;
display(Inputs.table(results));
``` |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The docs for DuckDbClient always reference taking a FileAttachment https://observablehq.com/framework/lib/duckdb but it says it can be expressed as an arrow table:
We use a basic fetch to grab the arrow data from our backend... example:
How can I leverage the db client in this way?
Beta Was this translation helpful? Give feedback.
All reactions