What if you never had to copy-paste static data again and could trust it was always correct?
Why Seeds for static reference data in dbt? - Purpose & Use Cases
Imagine you have a list of country codes and names stored in a spreadsheet. Every time you build your data models, you manually copy and paste this list into your queries or scripts.
It feels like a small task, but it happens over and over, and you worry about typos or outdated info.
Manually copying static reference data is slow and error-prone. You might forget to update the list, causing wrong results.
It also makes your data models messy and hard to maintain because the same data is repeated in many places.
Using seeds in dbt lets you store static reference data as CSV files inside your project.
dbt automatically loads this data as tables you can join with your models, keeping everything clean, consistent, and easy to update.
SELECT * FROM sales JOIN (VALUES ('US', 'United States'), ('CA', 'Canada')) AS countries(code, name) ON sales.country_code = countries.code
SELECT * FROM sales JOIN {{ ref('countries_seed') }} AS countries_seed ON sales.country_code = countries_seed.codeYou can easily manage and reuse static reference data across your entire project without duplication or errors.
A retail company uses seeds to store product categories and tax rates as static data, ensuring all sales reports use the same consistent info.
Manual copying of static data is slow and risky.
Seeds let you store static data as CSV files inside dbt projects.
This keeps your data models clean, consistent, and easy to maintain.