Generate Test Data for a dbt Project (Seeds) From Your SQL or GitHub

To test a dbt project you need data in its source tables. Production data is usually off-limits, and writing seed CSVs by hand is slow. SQL Project Lineage reads your models and YAML, works out which tables the project reads but does not build, and writes a seed for each one that your models and tests can run on.

Open the SQL Project Lineage

How it works

1. Open SQL Project Lineage and paste a public GitHub link (for example github.com/dbt-labs/jaffle-shop), or drop your project folder or a ZIP.

2. Open the **Test data** tab. You see every input table (source() or a ref() to a seed), its columns, its key and its foreign keys.

3. Pick rows per table (50 to 1,000) and click **Download seeds (ZIP)**.

What makes the data usable

  • **Columns from your SQL**, including columns read through `select * from source` CTEs and inside macros such as `cents_to_dollars('subtotal')`.
  • **Unique keys** where a column is the id or has a unique test.
  • **Foreign keys that join**: from relationships tests and from names such as orders.customer_id → customers.id. Every parent gets at least one child row, so left joins do not leave totals empty.
  • **accepted_values** tests are followed, so status columns only hold allowed values.
  • **Realistic values from column names**: dates, timestamps, emails, amounts, cents, booleans, countries. Totals add up (total = subtotal + tax).

What we tested

On dbt-labs/jaffle_shop, `dbt seed` and `dbt build` pass all 25 models and tests. On dbt-labs/jaffle-shop, every seed loads and 37 of 46 nodes pass. One test checks that an order subtotal equals the sum of its item prices, a rule that spans tables, so it fails and 6 nodes downstream of it are skipped. Business rules like that need a few rows adjusted by hand.

Next

Read how to run the seeds locally with DuckDB, no warehouse needed.

Open the SQL Project Lineage

Also try

How to use the SQL Project Lineage: step by step

  1. Load your dbt project or a GitHub link in SQL Project Lineage
  2. Open the Test data tab
  3. Choose rows per table
  4. Download the seeds ZIP and copy it into seeds/

When to use the SQL Project Lineage

  • Testing a dbt project without production data
  • Trying an open-source dbt project from GitHub
  • CI checks on a pull request
  • Teaching dbt with realistic data

Frequently asked questions

Is my project uploaded?

No. Files and GitHub downloads are read in your browser. The seeds are made there too.

Does it work with source() and ref()?

Yes. A source() table gets a seed, and the README shows the YAML that points the source at the seed schema. A ref() to a missing seed gets a seed with the same name.

How many rows can I generate?

Up to 1,000 rows per table, which is the sweet spot for dbt seeds. Tables that others point at get fewer rows, fact tables more.

Tip: Hover a column chip in the Test data tab: it shows which parent table a foreign key points at, or the allowed values.