Creating a SQL Model
Learn to write and run our first SQL model using dbt.
We'll cover the following
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
.
Creating models is called
Models can be defined in SQL or Python, with SQL being the most used.
Here’s an example of a model:
Get hands-on with 1400+ tech skills courses.