What Are dbt Models?
Last updated July 25, 2026 · By the SaturnSQL team
A dbt model is a SELECT statement saved as a .sql file in the models/ directory. dbt wraps it in the right DDL and creates a view or table in your warehouse when you run dbt run. How it is created is controlled by the materialization config: view, table, incremental, or ephemeral.
A model is just a SELECT
-- models/staging/stg_orders.sql
SELECT
id AS order_id,
customer_id,
amount,
created_at
FROM {{ source('shop', 'raw_orders') }}Choosing how it is built
Set the materialization in a config block at the top of the model, or per folder in dbt_project.yml.
{{ config(materialized='table') }}
SELECT ...Run this in SaturnSQL
SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.
Try it free