Model

A dbt model is a SQL file containing a single SELECT query. At run time, dbt turns it into a table or a view named after the file in the warehouse, adding the creation statement itself. Models chain together and form a graph of transformations.

Example

-- models/staging/stg_clients.sql
select id, lower(email) as email from {{ source('crm', 'clients') }}

Related concepts

The whole glossary