Skip to content

can i use DuckDBClient in node.js data loader? #1721

Answered by mbostock
chen56 asked this question in Q&A
Discussion options

You must be logged in to vote

Framework’s DuckDBClient client is currently built-in to Framework (it’s observablehq:stdlib/duck), so you can’t import it into a Node.js program. There’s an open issue #852 to publish a few of these built-in libraries to npm. You might be able to copy the source code and with a few changes get it working in Node.js.

That said, it’s probably better to use the official Node.js API for DuckDB in a Node.js data loader rather than using Framework’s DuckDBClient. The duckdb-async package provides a Promise-based API (and TypeScript types, if you want to use a TypeScript data loader).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@chen56
Comment options

Answer selected by Fil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants