npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gscdump/engine-duckdb-wasm

v7.2.0

Published

DuckDB-WASM engine adapter for @gscdump/analysis — typed browser analytics against parquet via R2.

Readme

@gscdump/engine-duckdb-wasm

npm version npm downloads license

Run DuckDB queries and Analyzers over Parquet files in the browser.

Install

npm install @gscdump/engine-duckdb-wasm @duckdb/duckdb-wasm

Query Parquet URLs

import {
  attachParquetUrlTables,
  bootDuckDBWasm,
  createInsightRunner,
} from '@gscdump/engine-duckdb-wasm'

const { db, conn } = await bootDuckDBWasm()
await attachParquetUrlTables({
  db,
  conn,
  tables: [{ table: 'queries', urls: ['https://example.com/data/queries.parquet'] }],
  maxFiles: 10,
  maxBytes: 50_000_000,
})

const runner = await createInsightRunner({ db, conn })
const client = await runner.client
const rows = await client.query('SELECT query, clicks, impressions FROM queries LIMIT 50')
console.log(rows)
await runner.close()
await db.terminate()

Replace the URL with a Parquet file containing the expected table columns, including date. The endpoint must support browser access and byte-range reads.

Attachment and caching

attachParquetUrlTables registers URLs with DuckDB's HTTP reader. It supports maxFiles, maxBytes, fetchConcurrency, and signal limits.

Preflight uses HEAD, with a one-byte range probe when needed. Trusted URL size hints can skip preflight by default; set trustSizeHint: false to require endpoint checks. The default HTTP mode disables full-file fallback reads. Handle attachment failures in your application if you want to offer server queries instead.

fetchInit applies to preflight requests only. DuckDB's own range reads need URLs that work without custom request headers.

Use attachOpfsParquetTables to cache snapshot files in the browser's Origin Private File System. Its file and byte limits apply before download. Use estimateOpfsStorage, requestPersistentStorage, and clearOpfsSnapshotCache to manage that cache.

Analyzers

createBrowserAnalysisRuntime runs Analyzers against attached tables. See @gscdump/analysis and ADR-0001 for the Source contract.

The package includes a vendored Drizzle adapter for typed queries. Transactions are unsupported.

Exports

| Group | Exports | | --- | --- | | Runtime | bootDuckDBWasm, createInsightRunner, createBrowserAnalysisRuntime | | Attachment | attachParquetTables, attachParquetUrlTables, attachParquetUrlTablesResult | | OPFS | attachOpfsParquetTables, readOpfsSnapshotFile, storage and cache helpers | | Schema | pages, queries, page_queries, countries, dates, hourly_pages, schema | | Queries | compileArchetypeSql, tableForArchetype, scopeFor, mergeScope | | Drizzle | createClient, drizzle, DuckDBWasmDatabase | | Dates | resolveWindow, re-exported from @gscdump/engine/period |

Schema exports follow @gscdump/engine/schema. Parquet snapshots are Site-specific; browser scopeFor currently adds no siteId predicate. Keep authorization and file selection in your application.

License

MIT