Skip to content

Commit

Permalink
Merge pull request #435 from openaddresses/switch-duckdb-library
Browse files Browse the repository at this point in the history
Switch DuckDB node bindings
  • Loading branch information
iandees authored Feb 25, 2025
2 parents fc6e1ef + dfa6bd9 commit e903183
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 551 deletions.
4 changes: 2 additions & 2 deletions task/collect.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { mkdirp } from 'mkdirp';
import S3 from '@aws-sdk/client-s3';
import { Upload } from '@aws-sdk/lib-storage';
import archiver from 'archiver';
import duckdb from 'duckdb';
import { DuckDBInstance } from '@duckdb/node-api';
import minimist from 'minimist';
import { Transform } from 'node:stream';
import wkx from 'wkx';
Expand Down Expand Up @@ -319,7 +319,7 @@ function zip_datas(tmp, datas, name) {

async function parquet_datas(tmp, datas, name) {
const dbFilePath = path.resolve(tmp, `${name}.duckdb`);
const db = new duckdb.Database(dbFilePath);
const db = await DuckDBInstance.create(dbFilePath);
const connection = db.connect();

const createTableQuery = `
Expand Down
Loading

0 comments on commit e903183

Please sign in to comment.