Set the default materialization in dbt_project.yml under models: with materialized: view (the default); override at the model level with {{ config(materialized='table') }} or in the model's YAML configuration block
Use view for lightweight transformations that are fast to query and do not need to store data; use table for models whose underlying query is expensive and results should be cached; use incremental for large fact tables that grow over time and you only want to reprocess new rows
Use ephemeral for intermediate transformation CTEs that should not be materialized in the warehouse at all; dbt inlines ephemeral models as CTEs in the queries of downstream models — they reduce clutter but can cause large SQL queries if deeply nested
For incremental models define the is_incremental() macro: {{ if is_incremental() }} ... {{ endif }} to add a WHERE clause filtering to only new rows; specify incremental_strategy (merge, append, insert_overwrite, delete_insert) based on warehouse support and desired behavior
Use dbt build instead of dbt run to execute models, tests, snapshots, and seeds in DAG order in a single command; this is the preferred command for production runs as it ensures tests pass at each stage before downstream models are materialized
Known gotchas
Ephemeral models cannot be queried directly (they are not materialized in the warehouse) and cannot be selected with dbt run --select; use them only for models that are always consumed by exactly one downstream model, not for shared intermediate tables
The incremental materialization with strategy=merge requires the warehouse to support MERGE statements (Snowflake, BigQuery, Databricks, Spark with Iceberg/Delta); on warehouses without native MERGE support use delete_insert or append with manual deduplication
Switching a model from view to table or vice versa in production does not automatically drop the old object; dbt creates the new object but leaves the old one in place, potentially causing confusion or wasted storage — run dbt run --full-refresh or manually drop the old object
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp