BASE

DuckDB

DuckDB

Database / data tool · Free

An embedded analytical SQL database: it runs local queries against tables and files and is useful for data analysis and embedded analytics.

Also known as: duckdb/duckdb; duckdb; duck-database

Resource illustration: DuckDB

Open resource ↗

What you can use for free

Code and local use under MIT.

Paid features and costs

Compute, your own hosting, and external services are paid for separately if selected.

Access and limitations

Code and local use under MIT. Compute, your own hosting, and external services are paid for separately if selected.

Use cases

  • Run an analytical SQL query against local data
  • Write an aggregation query and compare the result with reference data

Example workflow

A possible workflow; this is not a report of hands-on testing.

Run an analytical SQL query against local data.

Before you start

  • A schema, test dataset, and queries.
  • A supported database or runtime.

Steps

  1. Connect a table or file dataset to DuckDB.
  2. Write an SQL aggregation and compare the result with reference data.
  3. Save the query and input file schema; repeat the calculation with a new sample and missing data.

Check your result

  • Aggregates match reference data; check NULL, types, and time zones.
  • Files can be read within available memory; the workflow does not require promised managed hosting.

Choosing DuckDB

Run an analytical SQL query against local data

Choose this when

  • Run an analytical SQL query against local data
  • Write an aggregation query and compare the result with reference data

Consider alternatives when

  • When choosing for this topic, compare DuckDB with Apache Superset. A candidate to compare under the topic: Databases. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.
  • When choosing for this topic, compare DuckDB with ClickHouse. A candidate to compare under the topic: Databases. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.

Things to consider

  • Costs and limits of free use: Compute, your own hosting, and external services are paid for separately if selected.
  • Terms of use: MIT: code; dependencies have separate licenses.

Frequently asked questions

What can you use for free in DuckDB?

Code and local use under MIT.

What additional costs might arise with DuckDB?

Compute, your own hosting, and external services are paid for separately if selected.

What terms of use matter for DuckDB?

MIT: code; dependencies have separate licenses.

How do you get started with DuckDB?

Connect a table or file dataset to DuckDB. Write an SQL aggregation and compare the result with reference data. Save the query and input file schema; repeat the calculation with a new sample and missing data.

Must CSV or Parquet be imported into a table first?

In the example, DuckDB reads a file directly from FROM: SELECT * FROM 'myfile.csv' or 'myfile.parquet'. A standalone CLI and Python, R, Java, and Wasm clients are available. SQL includes window functions, correlated subqueries, and nested arrays/structs/maps.

Related tasks and approaches

  • Apache Superset

    A candidate to compare under the topic: Databases. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.

  • ClickHouse

    A candidate to compare under the topic: Databases. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.

  • Metabase

    A candidate to compare under the topic: Databases. This is an editorial connection by topic, not a confirmed alternative or a guarantee that the products work together.

License

MIT: code; dependencies have separate licenses.

MIT — permissive license

You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.

License terms

Technologies and topics

  • DuckDB
  • database
  • Development

Sources

Other resources