People often search for dbt vs DuckDB as if they were competing choices, but they do different jobs. dbt manages transformation logic, and DuckDB is a database engine that can run it. Understanding that split makes it clear when you want one, the other, or both.
What dbt is
dbt is a framework for writing data transformations as SQL models. You define each model as a query, dbt works out the order they depend on each other, runs them against a database, and lets you attach tests and documentation. It does not store data and it does not extract data from sources. It handles the transform step of ELT, covered in ETL vs ELT.
What DuckDB is
DuckDB is an analytical database that runs inside your own process, with no separate server to set up. It stores data in a file, queries it with SQL, and reads formats such as CSV and Parquet directly. It is built for analytics on a single machine, which makes it quick to start and cheap to run.
Why the comparison does not quite work
dbt needs a database to run its SQL against, and DuckDB is one that dbt can use. The two are layers in the same stack: DuckDB provides the storage and query engine, and dbt organizes, orders and tests the transformations that run on it. Asking which is better is like asking whether a spreadsheet application is better than a file format.
Using them together
A dbt project can target DuckDB through an adapter, which gives you a full transformation workflow on a laptop with nothing to provision. You get dependency ordering, automated tests and documentation, without the cost or setup of a cloud warehouse. I used this pairing in the Olist E-Commerce Analytics Engineering project, a dbt star schema on DuckDB with automated tests, and in the Retail Analytics Warehouse project.
When you want something else
DuckDB runs on one machine, so it fits when your data comfortably fits there. If many people need to query shared data at the same time, or the data is large and growing, a cloud warehouse is the more natural home, and dbt can run against that too. The decision between the two environments is covered in dbt and DuckDB versus a cloud warehouse, and the wider platform choice in warehouse vs lake vs lakehouse.
What dbt does not do
dbt will not pull data from your sources or load it for you, so you still need an ingestion step. It also does not schedule itself, so something has to trigger the runs. And its tests check the rules you write, which is a narrower job than the monitoring described in data observability. Layering the models into raw, cleaned and business-ready stages is a design choice you make, such as in medallion architecture.
A quick checklist
- Do you need to organize and test SQL transformations? That is dbt’s job.
- Do you need somewhere to run queries cheaply on one machine? DuckDB fits.
- Will many people query the data at once, or will it outgrow one machine?
- Do you have a plan for ingesting the raw data?
- Do you have a way to schedule and monitor the runs?
If you want a transformation project set up, see my ETL and ELT engineering service.
FAQ
Is DuckDB a replacement for dbt?
No. DuckDB is a database engine, while dbt is a transformation framework. dbt can run its SQL models on DuckDB.
Can dbt run on DuckDB?
Yes. dbt supports DuckDB through an adapter, which lets you build and test models locally without a cloud warehouse.
Does dbt store my data?
No. dbt runs SQL in a database or warehouse you connect it to, and the data lives there.

