-
Beta Was this translation helpful? Give feedback.
Answered by
domoritz
Apr 13, 2022
Replies: 1 comment 1 reply
-
async insertCSV(name, buffer, options) {
const db = await this.db();
await db.registerFileBuffer(name, new Uint8Array(buffer));
const conn = await db.connect();
await conn.insertCSVFromPath(name, { name, schema: "main", ...options });
await conn.close();
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
yilan007
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
conn
is a connection. Here is a code snippet from the DuckDB Observable client. So note that you callinsertCSVFromPath
on the connection.