Analytics Legends logoAI & Analytics Legends Sign inSign up
Concept card

Snowflake Cortex Analyst — NL-to-SQL

Snowflake Cortex Analyst — NL-to-SQL — AI & Analytics Legends section illustration for the SAP AI & Analytics knowledge base (concepts, studies, Academy)

As of 2026-11-21

What is Snowflake Cortex Analyst?

Cortex Analyst trades setup effort for determinism — a formal YAML semantic model means questions mapping to the same declared measure produce consistent SQL (Snowflake documents no strict determinism guarantee), which supports compliance in regulated reporting.

What it is

Cortex Analyst is Snowflake's native text-to-SQL capability (Snowflake's documentation now recommends transitioning to Cortex Agents, which it says supports every Cortex Analyst capability with higher answer quality — Snowflake docs — Cortex Analyst), designed so that every natural-language question a business user asks maps to SQL through a formally authored semantic model rather than through free-form inference by the underlying language model. That single architectural choice — a declared semantic model instead of loose hints — is both Cortex Analyst's core strength and the main source of the effort required to deploy it well.

Why it matters: the semantic model is a semantic view (a native Snowflake schema object) or, on the legacy route still supported, a YAML file, that explicitly declares the tables involved, the dimensions available for filtering and grouping with their business-facing labels, the measures with their exact aggregation formulas, the join relationships between tables, and any fiscal-calendar or time-intelligence rules the business needs. When a user asks a question such as what revenue looked like by region in the second quarter, Cortex Analyst does not ask the model to invent an interpretation; it matches the question against the declared measure, dimension, and time definitions and generates SQL that implements exactly those mappings. Because the model is not guessing at metric formulas or join paths, two different phrasings of the same underlying question tend to produce consistent SQL and the same answer (Snowflake documents no strict determinism guarantee).

Why it matters

  • Unlike Genie's free-text hints, Cortex Analyst forces the semantic-model author to declare exact aggregation formulas and join paths upfront.
  • That determinism matters most for regulated finance/compliance reporting, where the same question phrased differently must return the same answer every time.
  • The semantic model itself is the deployment bottleneck — accurately declaring every measure's formula for a replicated SAP GL dataset is the hard part.

Key points

  • Cortex Analyst is Snowflake's native text-to-SQL: every question maps to SQL through a formally authored semantic model, not through free-form inference by the model.
  • The semantic model (a semantic view — a native schema object — or, on the legacy route, a YAML file) declares tables, dimensions with business labels, measures and their aggregation rules.
  • It trades setup effort for determinism — the same question on the same declared measure maps to consistent SQL (Snowflake documents no strict determinism guarantee, as of November 2026), which supports compliance in regulated reporting.
  • Budget the semantic-model authoring as the main cost of the project; the query interface itself is the cheap part.
  • Snowflake's current best-practice guidance sets no hard size limit on a semantic view but suggests keeping it under about 100,000 tokens (a guideline, as of November 2026) and starting a proof of concept with 5-10 tables — plan domain-scoped models rather than one enterprise-wide file.
  • Semantic views are a native schema object (their authoring environment, Semantic Studio, became GA on 30 Sep 2026), moving the semantic model toward a first-class, versionable database object rather than an external YAML upload.
  • Unlike Joule's NL query in Datasphere, where the entity model and the semantic model are the same artefact, Cortex Analyst's semantic model is a separate build effort — the trade-off is a model that works over any Snowflake table, SAP-sourced or not.
  • Validate every model before deployment with CALL SYSTEM$CREATE_SEMANTIC_VIEW_FROM_YAML(..., TRUE) (verify-only) and gate any change to it through the same CI review a schema migration would get.

Terms used on this page

Semantic model (Cortex Analyst)
A semantic view (native schema object) or, on the legacy route, a YAML file declaring tables, dimensions, measures, aggregation formulas and join paths — the artefact Cortex Analyst maps every natural-language question against.
Semantic view
Snowflake's newer, native schema-object form of the semantic model, moving it toward a versionable, governed database object rather than an externally uploaded YAML file.
SYSTEM$CREATE_SEMANTIC_VIEW_FROM_YAML (verify-only)
A Snowflake system procedure that, called in verify-only mode — CALL SYSTEM$CREATE_SEMANTIC_VIEW_FROM_YAML('<db>.<schema>', $$<yaml>$$, TRUE) — checks a semantic model YAML without creating the semantic view; CREATE SEMANTIC VIEW likewise rejects an invalid definition. This is the recommended pre-launch and CI gate (there is no SNOWFLAKE.CORTEX.VALIDATE_SEMANTIC_MODEL function).
Time intelligence rule
An explicit declaration inside the semantic model mapping fiscal periods (e.g. 'Q1') to the correct posting-period boundaries, rather than defaulting to calendar-month logic that can silently diverge from an SAP fiscal calendar.
Determinism (NL-to-SQL)
The property that the same business question, phrased differently, tends to produce the same SQL and the same answer — supported, not guaranteed, by a formally declared semantic model rather than free-form LLM inference.
Row-level SCD filter
A declared filter (e.g. valid_to = '9999-12-31') that tells the semantic model which rows of a slowly-changing-dimension table count as 'current', preventing double-counting on replicated SAP master data.

Sources

  1. Snowflake — Cortex Analyst docs
  2. Snowflake Docs — Cortex Analyst semantic model specification
  3. Snowflake Quickstarts — Semantic file generation for Cortex Analyst
  4. Snowflake Developers — Getting Started with Cortex Analyst
  5. Snowflake Docs — YAML specification for semantic views
  6. Snowflake Docs — Snowflake AI (Cortex) pricing
  7. Snowflake docs — Semantic views overview (native schema object; usable with Cortex Analyst REST API and Cortex Agents)
  8. Snowflake release note 30 Sep 2026 — Semantic Studio (General availability)
  9. Snowflake docs — Cortex Analyst REST API (how semantic views/models are referenced in requests)
  10. Snowflake docs — Cortex Analyst routing mode (selecting among semantic models/views at query time)
  11. Snowflake docs — Semantic view verified query repository (verified queries to improve accuracy)
  12. Snowflake docs — Semantic View Autopilot (assisted semantic view generation)
  13. Snowflake docs — About SAP and Snowflake (zero-copy SAP connector; relevance to SAP-sourced semantic models)
  14. Snowflake release note 16 Sep 2026 — Cortex Agents object enhancements (GA)

Full card with the Consultant plan — €19.90/month. What the full card adds: the full decision framework · the SAP vs Snowflake / Databricks / Fabric comparison · the common pitfalls and their fix · the cheat sheet · the architecture schemas · the code blocks · the facts worth quoting.

Open in the app →

Open missions

SAP analytics jobs and contracts · freelance SAP contracts.