Search⌘ K
AI Features

Creating a SQL Model

Explore how to create SQL models in dbt to define tables or views using simple SELECT queries. Understand best practices for effective data modeling, including schema definition, naming consistency, and breaking down complex models for easier debugging and maintenance. This lesson prepares you to build clean, reusable data models essential for analytics engineering tasks.

What’s a model?

dbt models are files that are used to generate tables or views. Each model is defined in one single file and corresponds to a single table/view. The table name is inherited from the file name, so if our model is stored in a file called recipes.sql, it will be called recipes ...