Skip to main content
A view materialization creates a view in your data warehouse that represents the SQL query of your dbt model. Unlike tables, views don’t store data physically – they’re simply stored query definitions that run each time they’re accessed.

How View Materializations Work

When you materialize a model as a view, dbt creates or replaces a view in your warehouse. During each run, dbt:
  1. Creates or replaces the view definition using your model’s SQL
  2. Stores the query definition, not the actual data
  3. When queried later, the view executes its underlying SQL on-demand
This means:
  • No physical data storage – just the query definition
  • Data is always up-to-date with source changes
  • Queries run the entire transformation each time
  • Build times are faster since no data is materialized
Under the hood, dbt executes a CREATE VIEW or CREATE OR REPLACE VIEW statement:
Views are ideal when you need real-time data or when build time is more important than query performance.

When to Use View Materializations

Views are particularly valuable for:

Configuring View Materializations

Views can be configured at both the model and project level.

Model-Level Configuration

Project-Level Configuration

This sets all models in the staging/ directory to materialize as views.

Performance Considerations

Views have different performance characteristics across warehouses: To apply specific view configurations, use the config() function with appropriate parameters:

Advantages and Limitations


When to Consider Other Materializations

While views are powerful, consider alternatives when:
  • Query performance becomes critical (use tables)
  • Transformations are complex and compute-intensive (use tables)
  • View references lots of data but users only need recent records (use incremental models)
  • Transformation is only a stepping stone for a single downstream model (use ephemeral)

Best Practices

  1. Default to Views: Start with views for most models and change only when needed
  2. Staging Models: Keep staging models as views for flexibility
  3. Query Optimization: Write efficient SQL to reduce runtime overhead
  4. Monitor Performance: Watch for slow-running views and consider materializing as tables
  5. Documentation: Clearly document performance expectations for view models
By using view materializations strategically, you can create flexible, always-up-to-date data transformations while minimizing storage costs and build times.