Creating a SQL Model

Learn to write and run our first SQL model using dbt.

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 data modelingData modeling is the process of structuring and creating data.. Implementing consistent and well-documented data models is a huge part of an analytics engineer’s role.

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.