- Installation
- Documentation
- Getting Started
- Connect
- Data Import and Export
- Overview
- Data Sources
- CSV Files
- JSON Files
- Overview
- Creating JSON
- Loading JSON
- Writing JSON
- JSON Type
- JSON Functions
- Format Settings
- Installing and Loading
- SQL to / from JSON
- Caveats
- Multiple Files
- Parquet Files
- Partitioning
- Appender
- INSERT Statements
- Lakehouse Formats
- Client APIs
- Overview
- ADBC
- C
- Overview
- Startup
- Configuration
- Query
- Data Chunks
- Vectors
- Values
- Types
- Prepared Statements
- Appender
- Table Functions
- Replacement Scans
- API Reference
- C++
- CLI
- Overview
- Arguments
- Dot Commands
- Output Formats
- Editing
- Friendly CLI
- Safe Mode
- Autocomplete
- Syntax Highlighting
- Known Issues
- Go
- Java (JDBC)
- Overview
- Define Connections
- Run Queries
- Import Data
- Handle Results
- Define Functions
- Profile and Monitor
- Troubleshoot
- Node.js (Neo)
- ODBC
- Python
- Overview
- Data Ingestion
- Conversion between DuckDB and Python
- DB API
- Relational API
- Function API
- Types API
- Expression API
- Spark API
- API Reference
- Known Python Issues
- R
- Rust
- Wasm
- Tertiary Clients
- SQL
- Introduction
- Statements
- Overview
- ANALYZE
- ALTER TABLE
- ALTER VIEW
- ATTACH and DETACH
- CALL
- CHECKPOINT
- COMMENT ON
- COPY
- CREATE INDEX
- CREATE MACRO
- CREATE SCHEMA
- CREATE SECRET
- CREATE SEQUENCE
- CREATE TABLE
- CREATE VIEW
- CREATE TYPE
- DELETE
- DESCRIBE
- DROP
- EXPORT and IMPORT DATABASE
- INSERT
- LOAD / INSTALL
- MERGE INTO
- PIVOT
- Profiling
- SELECT
- SET / RESET
- SET VARIABLE
- SHOW and SHOW DATABASES
- SUMMARIZE
- Transaction Management
- UNPIVOT
- UPDATE
- USE
- VACUUM
- Query Syntax
- SELECT
- FROM and JOIN
- WHERE
- GROUP BY
- GROUPING SETS
- HAVING
- ORDER BY
- LIMIT and OFFSET
- SAMPLE
- Unnesting
- WITH
- WINDOW
- QUALIFY
- VALUES
- FILTER
- Set Operations
- Prepared Statements
- Data Types
- Overview
- Array
- Bitstring
- Blob
- Boolean
- Date
- Enum
- Geometry
- Interval
- List
- Literal Types
- Map
- NULL Values
- Numeric
- Struct
- Text
- Time
- Timestamp
- Time Zones
- Union
- Typecasting
- Variant
- Expressions
- Overview
- CASE Expression
- Casting
- Collations
- Comparisons
- IN Operator
- Logical Operators
- Star Expression
- Subqueries
- TRY
- Functions
- Overview
- Aggregate Functions
- Array Functions
- Bitstring Functions
- Blob Functions
- Date Format Functions
- Date Functions
- Date Part Functions
- Enum Functions
- Geometry Functions
- Interval Functions
- Lambda Functions
- List Functions
- Map Functions
- Nested Functions
- Numeric Functions
- Pattern Matching
- Regular Expressions
- Struct Functions
- Text Functions
- Time Functions
- Timestamp Functions
- Timestamp with Time Zone Functions
- Union Functions
- Utility Functions
- Window Functions
- Constraints
- Indexes
- Meta Queries
- DuckDB's SQL Dialect
- Overview
- Indexing
- Friendly SQL
- Keywords and Identifiers
- Order Preservation
- PostgreSQL Compatibility
- SQL Quirks
- PEG Parser
- Samples
- Configuration
- Extensions
- Overview
- Installing Extensions
- Advanced Installation Methods
- Distributing Extensions
- Versioning of Extensions
- Troubleshooting of Extensions
- Core Extensions
- Overview
- AutoComplete
- Avro
- AWS
- Azure
- Delta
- DuckLake
- Encodings
- Excel
- Full Text Search
- httpfs (HTTP and S3)
- Iceberg
- ICU
- inet
- jemalloc
- Lance
- MotherDuck
- MySQL
- ODBC
- Quack
- PostgreSQL
- Spatial
- SQLite
- TPC-DS
- TPC-H
- UI
- Unity Catalog
- Vortex
- VSS
- Quack Remote Protocol
- Guides
- Overview
- Data Viewers
- Database Integration
- File Formats
- Overview
- CSV Import
- CSV Export
- Directly Reading Files
- Directly Reading DuckDB Databases
- Excel Import
- Excel Export
- JSON Import
- JSON Export
- Parquet Import
- Parquet Export
- Querying Parquet Files
- File Access with the file: Protocol
- Meta Queries
- Describe Table
- EXPLAIN: Inspect Query Plans
- EXPLAIN ANALYZE: Profile Queries
- List Tables
- Summarize
- DuckDB Environment
- Network and Cloud Storage
- Overview
- HTTP Parquet Import
- S3 Parquet Import
- S3 Parquet Export
- S3 Iceberg Import
- S3 Express One
- GCS Import
- Cloudflare R2 Import
- DuckDB over HTTPS / S3
- Fastly Object Storage Import
- SeaweedFS Import
- Tigris Import
- ODBC
- Performance
- Overview
- Environment
- Import
- Schema
- Indexing
- Join Operations
- File Formats
- How to Tune Workloads
- My Workload Is Slow
- Out-of-Memory Issues
- Benchmarks
- Working with Huge Databases
- Python
- Installation
- Executing SQL
- Jupyter Notebooks
- marimo Notebooks
- SQL on Pandas
- Import from Pandas
- Export to Pandas
- Import from Numpy
- Export to Numpy
- SQL on Arrow
- Import from Arrow
- Export to Arrow
- Relational API on Pandas
- Multiple Python Threads
- Integration with Ibis
- Integration with Polars
- Integration with PyTorch
- Using fsspec Filesystems
- SQL Editors
- SQL Features
- AsOf Join
- Full-Text Search
- Graph Queries
- query and query_table Functions
- Merge Statement for SCD Type 2
- Timestamp Issues
- Snippets
- Creating Synthetic Data
- Dutch Railway Datasets
- Sharing Macros
- Analyzing a Git Repository
- Importing Duckbox Tables
- Copying an In-Memory Database to a File
- Troubleshooting
- Glossary of Terms
- Browsing Offline
- Operations Manual
- Overview
- DuckDB's Footprint
- Installing DuckDB
- Logging
- User Agents
- Securing DuckDB
- Non-Deterministic Behavior
- Limits
- DuckDB Docker Container
- Development
- DuckDB Repositories
- Release Cycle
- Metrics
- Profiling
- Building DuckDB
- Overview
- Build Configuration
- Building Extensions
- Android
- Linux
- macOS
- Raspberry Pi
- Windows
- Python
- R
- Troubleshooting
- Unofficial and Unsupported Platforms
- Benchmark Suite
- Testing
- Internals
- Sitemap
- Live Demo
Overview
This page collects common issues encountered when using DuckDB-Wasm, together with their workarounds. If you run into a problem that is not covered here, search the duckdb-wasm issue tracker on GitHub.
Network Error When Querying Remote Files
When DuckDB-Wasm reads a remote file — through the Wasm-flavored httpfs extension or registerFileURL — the browser issues the request, so it is subject to the browser's CORS policy and every request is upgraded to HTTPS.
The server hosting the data must allow (using CORS headers) the origin that hosts the DuckDB-Wasm instance to read it. If the server does not send the required headers, the query fails with a network error such as:
Failed to execute 'send' on 'XMLHttpRequest'
For example, when querying files from Amazon S3, configure the bucket's CORS policy to allow GET and HEAD requests:
[
{
"AllowedHeaders": ["*"],
"AllowedMethods": ["GET", "HEAD"],
"AllowedOrigins": ["*"],
"ExposeHeaders": [],
"MaxAgeSeconds": 3000
}
]
This array is a server-side bucket configuration (for Amazon S3, the bucket's CORS policy), not a value you pass to DuckDB-Wasm. There is no db or connection option and no DuckDBGlobalFileInfo field for it, because the browser, not DuckDB-Wasm, enforces CORS. Apply it where the data is hosted, then read the file as usual.
Beyond CORS, reading remote files has several other known limitations:
- Because every request is upgraded to HTTPS, an
http://URL can be rewritten incorrectly (for example tohttps://http//…), which breaks reads against local or non-TLS endpoints (see duckdb-wasm issue #2118). - DuckDB relies on HTTP range requests to read only part of a file. Range requests can fail on Firefox (see issue #1932) and are not detected correctly for some S3 pre-signed URLs (see issue #2228), which forces the whole file to be downloaded or makes the read fail.
- Cached reads of files in DuckDB's native format over HTTP can be corrupted (see issue #1957).
- HTTP authentication headers are not supported, so endpoints that require them cannot be read directly (see issue #1967).
Extension Fails to Load from a Custom Repository
DuckDB-Wasm fetches each extension over the network when it is loaded. If you serve extensions from a custom repository with SET custom_extension_repository = '⟨https://some.url.com⟩', the GET requests for the extension files must be CORS enabled for the browser to allow the connection, exactly as for remote data files above.
Extensions remain signed regardless of where they are served, so copying an extension to a different location keeps its signature valid.
Out of Memory
The WebAssembly client has a limited amount of memory available: WebAssembly limits the available memory to 4 GB and browsers may impose even stricter limits. Queries over large datasets can therefore run out of memory where native DuckDB would not. To stay within the limit:
- Stream large results with
send()instead of materializing them all at once withquery(). - Read only the columns and rows you need. Because DuckDB reads Parquet files lazily, projections, filters, and
LIMITclauses let entire row groups be skipped rather than loaded into memory.
See Limitations for the other constraints of the WebAssembly client.
Threading Is Not Available
By default, the WebAssembly client uses a single thread; multithreading is available through the coi bundle but is still experimental.
The threaded bundle relies on SharedArrayBuffer, which browsers only expose to pages that are cross-origin isolated. If the top-level document is not served with the Cross-Origin-Embedder-Policy and Cross-Origin-Opener-Policy headers, DuckDB-Wasm falls back to the single-threaded mvp or eh bundle.
See Cross-Origin Isolation for the required headers, and Threading for how to select and configure the coi bundle.
Further Reading
- DuckDB Wasm Client — installation, basic usage, and the limitations behind several issues above.
- Import Data — registering and reading remote files that are subject to the CORS rules above.
- Load Extensions — how extensions are fetched, signed, and served, including the httpfs CORS behavior.
- Deploy — serving components and configuring cross-origin isolation for threading.