DuckDB Client for Observable | CMU Data Interaction Group | Observable
ojs
ojs
ojs
Enter
↯ database
Enter
↪︎ output
sql
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
Enter
↯ database
Enter
↪︎ output
sql
ojs
Enter
↯ database
Enter
↪︎ output
sql
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
ojs
Enter
↯ database
Enter
↪︎ output
sql
ojs
ojs
ojs
ojs
ojs
ojs
Author
Dominik Moritz
@domoritz
Faculty at CMU (@cmudig) and researcher at
@apple
.
Comments (11)
Michael Whitaker
Feb 8, 2022
Is it possible to export a DuckDB database or table to a file?
Dominik Moritz
Feb 8, 2022
Yes. The easiest way is to write a query, get the result as Apache Arrow and then write that to a buffer.
Fil
May 27, 2022
Is it possible to create a table from an array of objects? It would be neat to write dbClient = DuckDBClient.of([{data: [{a:"Hello"}, {a:"World"}], columns: ["a", "b", "c"]}]); (columns would be optional).
Ismael
Aug 24, 2022
I've tried the following and it does not work throwing an error: DuckDBClient.of([ {file: FileAttachment("penguins.csv"), header: true} ])
Dominik Moritz
Aug 24, 2022
Thanks for raising the issue. I fixed it.
Ian Johnson
Jan 25, 2023
might be nice to link to the client in the observable repo:
https://github.com/observablehq/stdlib/blob/main/src/duckdb.js
Jan 25, 2023
or i suppose this one, like was linked in the cmudig/duckdb notebook:
https://observablehq.com/@observablehq/duckdb
Dominik Moritz
Jan 25, 2023
I added a link to the note.
Reply
Fil
May 27, 2022
looks like we don't need `.toArray().map(Object.fromEntries)` anymore?
Dominik Moritz
May 29, 2022
Right, I fixed that. Thanks!
Reply
Fil
May 27, 2022
and no need for toArray() here
Reply
Add comment
Subscribe to notifications
© 2026 Observable, Inc.
Terms of service
Privacy policy
Product
About
Pricing
Documentation
Release notes
Contact us
Open source
Notebook Kit
Plot
D3
Community
Explore
Forum
Bluesky
YouTube
X
17
Follow
Follow
DuckDB Client for Observable | CMU Data Interaction Group | Observable