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-pipelinesCOPY 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.
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:
ALTER SEMANTIC VIEW revenue_analysis SET MAX_STALENESS = '2 hours';
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:
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$$);
{"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:
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 REPLACEdrops every materialization. Change a semantic view withCREATE OR ALTERinstead.- 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
WHEREclause 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. CheckSHOW MATERIALIZATIONS IN SEMANTIC VIEWand the refresh history, or a dashboard quietly slows down again. - The documentation pages disagree on one detail. The materializations guide writes
MAX_STALENESSas a string ('1 hour'), while theALTER SEMANTIC VIEWreference 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.
