Semantic view materializations, and the queries they do not speed up

Semantic view materializations are generally available from November 2026. How the metrics are chosen and refreshed, and why Cortex Analyst skips them.

Code for this article

cloudcentrix-labs/snowflake-data-pipelines

COPY and Snowpipe ingestion, error tables that keep the rows a load rejects, semantic view materializations and dynamic table chains.

In CI. Lints the SQL with sqlfluff, skipping a few statements with newer syntax. That does not prove the scripts run.

4 posts are written against it

Semantic views are how Snowflake describes a business in terms people actually use: revenue, customers, orders by year, not table joins. Defined once, they feed dashboards, SQL users and Cortex alike. The weak spot has been speed. Every question against a semantic view still runs against the base tables, so a popular metric over a large fact table gets computed over and over again.

On 11 November 2026 Snowflake made semantic view materializations generally available. A materialization stores chosen metrics, pre-aggregated by chosen dimensions, and Snowflake routes queries to it automatically.

How it works

You set how stale the data may be on the semantic view, then add materializations to it:

SQL
ALTER SEMANTIC VIEW revenue_analysis SET MAX_STALENESS = '2 hours';
SQL
ALTER SEMANTIC VIEW revenue_analysis ADD MATERIALIZATION revenue_by_customer_year
  WAREHOUSE = my_wh
  REFRESH_MODE = INCREMENTAL
  AS
    DIMENSIONS customers.customer_name, orders.order_year
    METRICS orders.total_revenue;

From then on, a query against the semantic view that asks for revenue by customer and year is answered from the materialization. Snowflake picks the cheapest materialization that covers the request and refreshes it in the background with the warehouse you named, to stay within MAX_STALENESS.

A materialization can also answer coarser questions, as long as the metrics can be re-added. Revenue by customer alone can come from the customer-and-year materialization, because SUM, COUNT, MIN and MAX re-aggregate correctly. Averages, distinct counts, medians and percentiles do not, so a materialization holding them only serves queries at exactly its own grain.

Check before you build

The most useful part of this release is two functions that answer "would this help?" without running anything. One tests a materialization you are thinking of adding:

SQL
SELECT SYSTEM$CHECK_HYPOTHETICAL_SEMANTIC_VIEW_MATERIALIZATION_REWRITE(
  $$SELECT * FROM SEMANTIC_VIEW(
      revenue_analysis
      DIMENSIONS customers.customer_name, orders.order_year
      METRICS orders.total_revenue)$$,
  $$ALTER SEMANTIC VIEW revenue_analysis ADD MATERIALIZATION revenue_by_customer_only
      WAREHOUSE = my_wh
      AS DIMENSIONS customers.customer_name
         METRICS orders.total_revenue$$);
Text
{"materialization":"REVENUE_BY_CUSTOMER_ONLY","canRewrite":false,"reason":"MISSING_DIMENSION","dimension":"ORDER_YEAR"}

The other, SYSTEM$CHECK_SEMANTIC_VIEW_MATERIALIZATION_REWRITE, does the same for one that already exists, taking its state and staleness into account. Run your ten most frequent dashboard queries through these before creating anything, and you design materializations around real workload instead of guesses.

Keep refreshes cheap

Materializations with non-additive metrics, or complex ones that span several tables, cannot refresh incrementally and are rebuilt in full every time. IMMUTABLE WHERE tells Snowflake which part of the data never changes, so refreshes skip it:

SQL
ALTER SEMANTIC VIEW revenue_analysis ADD MATERIALIZATION historical_revenue
    WAREHOUSE = my_wh
    IMMUTABLE WHERE (order_date < '2024-01-01')
AS
    DIMENSIONS orders.order_date
    METRICS orders.total_revenue;

Moving that boundary forward later, to make more history immutable, does not force a full rebuild; moving it back does.

The queries it does not speed up

This is the point to understand before promising anyone faster AI answers. In Snowflake's words, materializations benefit queries run as semantic SQL, through SEMANTIC_VIEW(...) or plain SQL against the semantic view. Cortex Analyst, Cortex Agents and Snowflake CoWork generate SQL against the underlying tables, so they do not use materializations.

So materializations are a win for dashboards, notebooks and analysts querying the semantic view, and for any application that sends semantic SQL. If the goal is faster plain-language answers from Cortex, the levers are elsewhere: a well-modelled gold layer, sensible warehouse sizing, and dynamic tables that pre-compute the heavy joins.

What will catch you

  • CREATE OR REPLACE drops every materialization. Change a semantic view with CREATE OR ALTER instead.
  • Governed columns switch it off. A materialization is not used when a masking or row access policy sits on a column it references. On governed data, plan for the base tables to do the work.
  • Filters must be at least as narrow. A materialization with a WHERE clause only serves queries whose filter is the same or more restrictive.
  • Some metrics are not allowed. Window-function metrics, metrics with USING (relationship), and level-of-detail expressions cannot be materialized.
  • Materializations can switch themselves off. Snowflake suspends one when refreshes cannot keep up with MAX_STALENESS, when a refresh fails, or when a change to the view breaks it. Check SHOW MATERIALIZATIONS IN SEMANTIC VIEW and the refresh history, or a dashboard quietly slows down again.
  • The documentation pages disagree on one detail. The materializations guide writes MAX_STALENESS as a string ('1 hour'), while the ALTER SEMANTIC VIEW reference shows whole seconds (7200). Test which your account accepts before scripting it.

Where we would start

Take the semantic view behind your busiest dashboard. Run its most common queries through the hypothetical check, add one or two materializations at the grain those queries share, mark history immutable, and watch the refresh history for a week. If those dashboards also have a Cortex chat on top, set expectations accordingly: the dashboard gets faster, the chat does not.

Our companion repository has a script that builds a semantic view and materializations on Snowflake's own sample data. It is written against Snowflake's documented syntax and linted in CI, and the README says what has and has not been run.

Further reading

More from the same code.

Other posts written against snowflake-data-pipelines.

All 18 posts

Put this to work on your Snowflake loads.

Merylene Schoeman wrote this post. Send us a few lines about the loads, pipelines or models you want built or fixed.

Talk to an engineerWe reply within one business day.

What happens next

  1. You send a few lines about the problem.
  2. One of us replies within one business day.
  3. You talk it through with the engineer who would do the work.
  4. You get a fixed scope, timeline and price before any work starts.

We sign an NDA before the first conversation if you want one.

Or write to info@cloudcentrix.co.za or call +27 82 445 4311.