Define a Snowflake semantic view using SQL DDL to expose business metrics and dimensions for use with Cortex Analyst

domain: docs.snowflake.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Write a CREATE SEMANTIC VIEW statement that declares TABLES (logical tables mapped to physical base tables or views), RELATIONSHIPS (joins between logical tables on shared keys), FACTS (row-level numeric attributes), DIMENSIONS (categorical attributes for grouping and filtering), and METRICS (aggregated measures such as SUM or COUNT expressions).
  2. Alternatively, use the Snowsight wizard (database > schema > + Create Semantic View) to interactively define tables, relationships, and measures, or upload a YAML file conforming to the Snowflake semantic view YAML specification via the Snowsight UI.
  3. Grant SELECT on the semantic view to roles that need to query it, using standard Snowflake GRANT syntax.
  4. Reference the semantic view in Cortex Analyst REST API requests to enable natural-language querying against the defined business model.
  5. Use DESCRIBE SEMANTIC VIEW and SHOW SEMANTIC VIEWS to inspect the defined structure; use ALTER SEMANTIC VIEW to modify it without dropping and recreating.

Known gotchas

Related routes

Create a Snowflake semantic view using CREATE SEMANTIC VIEW DDL with tables, relationships, dimensions, and metrics
docs.snowflake.com · 5 steps · unrated
Configure AtScale as a universal semantic layer over Snowflake using the Open Semantic Interchange (OSI) standard to expose governed metrics to Power BI and AI agents
www.atscale.com · 5 steps · unrated
Chain Snowflake dynamic tables into a DAG using target_lag propagation
data-engineering · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans