Understand and Work With dbt Seeds

Lab Steps

lock
Connecting to the dbt Web IDE
lock
Creating a dbt Seed
lock
Creating a dbt Model Based on the Seed
lock
Build the dbt Seed and Execute the Model

The hands-on lab is part of this learning path

Ready for the real environment experience?

DifficultyIntermediate
Time Limit1h
Students42

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
Students29002
Labs106
Courses2
Learning paths8

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.