How Can I Run dbt seed
for a Quickstart Model?
Question
How can I run dbt seed
for a Quickstart model?
Environment
Quickstart transformations
Answer
To run the dbt seed
command for a Quickstart model, do the following:
- Place the seed data CSV file in the
dbt_ft_prod/seeds
directory. - Define the column names and their data types in the
dbt_project.yml
file to ensure proper formatting. - Run the following command to create tables from all seed files:
sh dbt seed
- Run the following command to seed specific files using the
--select
flag:sh dbt seed --select "<new_seed>" "<another_new_seed>"
NOTE: In a production environment, you can ensure tables are created and refreshed automatically by scheduling a deployment job to run the
dbt seed
command daily.