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).
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.
Grant SELECT on the semantic view to roles that need to query it, using standard Snowflake GRANT syntax.
Reference the semantic view in Cortex Analyst REST API requests to enable natural-language querying against the defined business model.
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
Snowflake semantic views are defined through SQL DDL (CREATE SEMANTIC VIEW) or via Snowsight; do not apply Databricks-specific YAML metric-view syntax (such as a 'version: v1.1' header) — Snowflake has its own separate YAML specification format for upload via the UI.
Semantic views are schema-level metadata objects, not stored queries; querying them with SELECT passes through to the underlying physical tables, so the physical tables must remain accessible to the role.
Metrics defined in a semantic view require explicit aggregation functions; referencing a metric column without aggregation in a plain SELECT returns an error.
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