# Test dbt Models Locally With DuckDB and Generated Seeds

> Run dbt seed and dbt build on your laptop with dbt-duckdb and generated test data. The profiles.yml, source schema change and commands, step by step.

Page: https://datautility.in/blog/test-dbt-models-locally-duckdb-seeds
This is the Markdown copy of the page. The tool itself runs in the browser: your files are processed on your own device and are not uploaded.

Published 2026-11-28 · Create · dbt duckdb, test dbt locally, dbt seed, dbt build local, dbt without warehouse, dbt-duckdb profiles.yml

You can run a whole dbt project on your laptop in a minute: DuckDB is the database, seeds are the data, and nothing touches your warehouse. Here is the full setup, using test data generated from your own project.

Open the tool: [SQL Project Lineage](https://datautility.in/sqllineage)

## 1. Get the seeds

Load your project in [SQL Project Lineage](https://datautility.in/sql-lineage-analyzer), open the **Test data** tab and download the ZIP. Copy the CSV files into `seeds/`.

## 2. Install dbt-duckdb

```bash
pip install dbt-duckdb
```

## 3. Add a DuckDB profile

```yaml
# profiles.yml (use the profile name from your dbt_project.yml)
jaffle_shop:
  target: dev
  outputs:
    dev:
      type: duckdb
      path: dev.duckdb
      threads: 4
```

## 4. Point sources at the seeds

Seeds load into your target schema (or the schema your project sets for seeds). If your models use source(), set the source schema to it while testing:

```yaml
sources:
  - name: ecom
    schema: "{{ target.schema }}"
```

The README in the ZIP has this YAML already filled in for your sources, and says when your project has its own generate_schema_name macro.

## 5. Run

```bash
dbt deps    # if you have packages.yml
dbt seed
dbt build
```

## If a test fails

- **not_null on a total**: a parent row has no child rows. The generator avoids this, but hand-edited seeds can bring it back.

- **expression_is_true across tables**: random data cannot know your business rule. Edit a few rows, or exclude the test while you develop.

- **Missing column**: add it to the CSV. Columns built only from Jinja that is not visible in the SQL cannot be detected.

## How to use the SQL Project Lineage: step by step

1. Download seeds from the Test data tab
2. pip install dbt-duckdb and add the profile
3. Point sources at the seed schema
4. Run dbt seed and dbt build

## When to use the SQL Project Lineage

- Developing dbt models offline
- Running dbt build in CI without a warehouse
- Reviewing a pull request locally
- Learning dbt on a real project

## Also try

- [Generate test data for a dbt project](https://datautility.in/blog/generate-test-data-for-dbt-project-seeds)

## More guides

- [Free Mock Data Generator: Realistic Test Data in 1 Minute](https://datautility.in/blog/free-mock-data-generator-test-data)
- [Generate Test Data from a CREATE TABLE (500k Rows)](https://datautility.in/blog/generate-test-data-from-schema)
- [Synthetic Data vs Random Fake Data: What Is the Difference?](https://datautility.in/blog/synthetic-data-vs-fake-data-generator)
