Understand and Work With dbt Seeds
Description
When you have to model data for analysis purposes, you could be in the need to start from one or more analysis datasets you have stored as CSV files. In this scenario, you'd like to use your CSV files as sources for your dbt models in your project.
Because of these scenarios, dbt offers seeds. A dbt seed is a CSV file that is usually uploaded under the seeds folder, and that can be leveraged as it was a dbt model. When a dbt seed is built, the CSV data is loaded into your database. You can leverage it by using the ref dbt macro.
In this lab, you will create a CSV file that will be your dbt seed, and you will create a full-refresh dbt model that is based on the seed.
Learning Objectives
Upon completion of this lab, you will be able to:
- Understand what seeds are and how to use them
- Create dbt seeds and leverage them with models
Intended Audience
- Data analysts that need to perform transformations over a CSV dataset
- Developers that need to understand how to enable local CSV upload on dbt
Prerequisites
To get the most from this lab, you should have basic knowledge of dbt. To get ready, you can use the following labs: