hands-on lab

Understand and Work With dbt Seeds

Intermediate
Up to 1h
130
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.
Lab 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:

About the author
Students
40,106
Labs
106
Courses
2
Learning paths
10

Stefano studies Computer Science and is passionate about technology. He loves working with Cloud services and learning all the best practices for them. Google Cloud Platform and Amazon Web Services are the cloud providers he prefers. He is a Google Cloud Certified Associate Cloud Engineer. Node.js is the programming language he always uses to code. When he's not involved in studying or working, Stefano loves riding his motorbike and exploring new places.

Covered topics
Lab steps
Connecting to the dbt Web IDE
Creating a dbt Seed
Creating a dbt Model Based on the Seed
Build the dbt Seed and Execute the Model