Skip to content
LakeBench
ProblemsCommunityPricing
Sign inStart practicing
Back
  1. Home
  2. Interview prep
  3. What are dbt seeds?

dbt · Extra High-Value

What are dbt seeds?

Easydbt-38
seedscsvreflookup

Question

What are dbt seeds, and when should you use them?

Solution

Seeds are CSV files in your dbt project (usually under seeds/) that dbt loads into the warehouse as tables with dbt seed.

Example

seeds/country_codes.csv:

country_code,country_name
US,United States
IN,India
DE,Germany
dbt seed
# then in a model:
select * from {{ ref('country_codes') }}

Yes: seeds are referenced with ref(), like models.

Good use cases

  • Small mapping / lookup tables maintained by analysts in git
  • Static status code descriptions
  • Tiny seed lists for accepted product categories in lower environments

Bad use cases

  • Large fact histories (use EL tools / warehouse loads)
  • Frequently changing high-volume data
  • Secrets or PII dumps in CSVs

Mental model

CSV in git → dbt seed → warehouse table → ref('seed_name') in models

Configure seeds in dbt_project.yml (column types, schema) when defaults are wrong.

Interview tip: "Seeds are version-controlled micro-dimensions. If it needs an EL pipeline, it is not a seed."

PreviousNext