Kipi.ai / Insights / Blogs / Semantic Modeling in Snowflake : Powering Conversational Analytics at Scale

Semantic Modeling in Snowflake : Powering Conversational Analytics at Scale

By Daksh Trehan


Purpose

Traditional Business Intelligence (BI) workflows often create bottlenecks in data access, as business users rely on data analysts for complex SQL queries, data engineers for trusted metrics, and BI developers for dashboard creation. The demand for a more intuitive, governed, and conversational approach to data interaction is therefore paramount.

Snowflake Semantic Views and Cortex Analyst address this need by enabling the abstraction of business logic into reusable semantic layers, which can then be queried using natural language. This powerful combination offers enterprise-grade, secure analytics through everyday language, all while maintaining zero data movement, full Role-Based Access Control (RBAC) enforcement, and direct Snowsight integration. More significantly, this marks the emergence of a new semantic modeling paradigm directly within the data warehouse.

Turn insight into action. Book a session with our team.

A New Modeling Layer: The Semantic Mesh in Snowflake

Semantic Views represent a novel modeling approach, bridging the gap between raw data models and BI dashboards.

Key differentiators:

  • Not ETL artifacts: Unlike dbt models, they are not part of the extract, transform, load process.
  • Native to Snowflake: They reside directly within Snowflake, unlike BI semantic layers such as Looker’s LookML.
  • Enriched views: Beyond plain views, they incorporate metrics, relationships, and atural language query (NLQ)-ready annotations.

This creates a semantic mesh, empowering teams to:

  • Centralize: Consolidate KPIs and dimensions.
  • Connect: Integrate various interfaces, including Cortex, BI tools, and APIs.
  • Control: Implement version control using Data Definition Language (DDL).
  • Innovate: Future-proof their analytics infrastructure with LLM and natural language capabilities.

Semantic Views are more than just a new object; they are a new design pattern for modern data platforms.

Problem Statement

Even with the growing popularity of self-service BI tools, many organizations continue to struggle with:

  • Metric fragmentation: The same key performance indicator (KPI) is often calculated inconsistently across various reports.
  • Text-to-SQL hallucinations: Large Language Models (LLMs) frequently generate inaccurate joins or incorrect column references.
  • Repeated modeling: Similar logic is redundantly recreated in dbt, dashboards, and code.
  • High reliance on SQL-proficient analysts: Organizations depend heavily on individuals with strong SQL skills.

These challenges hinder scalability, prolong decision-making processes, and erode confidence in analytics platforms.

Snowflake’s Semantic Views offer a structured and governed abstraction layer, which Cortex Analyst then allows users to interact with using natural language.

Use case: Customer Purchase Funnel Analytics

We have e-commerce data tracking:

  • Customer signups
  • Orders and repeat buyers
  • Product-level sales across time and region


The schema includes:

Solution Design

We use Snowflake’s native CREATE SEMANTIC VIEW SQL DDL to model facts, relationships, and dimensions:

  • Entities: Logical base tables (CUSTOMERS, ORDERS, etc.)
  • Relationships: Joins declared explicitly (no YAML needed)
  • Facts: Computed fields like QUANTITY * PRICE
  • Dimensions: Attributes for filtering, grouping (e.g., region, signup_month)
  • Metrics: Aggregated KPIs like SUM(total_revenue), AVG(order_value)

All logic is stored inside the data warehouse — no external modeling layer needed. Cortex then detects this model automatically.

Definitions

  • Dimensions: Descriptive fields used for filtering or grouping (e.g., region, channel, signup_month)
  • Facts: Computed raw values that can be aggregated (e.g., QUANTITY * PRICE)
  • Metrics: Aggregations over facts (e.g., SUM(total_revenue), AVG(order_value))
  • Relationships: Logical joins between tables, declared once (e.g., orders(CUSTOMER_ID) REFERENCES customers)

These form the building blocks of our semantic model.

Accessing Semantic Views

Semantic Views can be accessed via AI & ML → Cortex Analyst

Querying Semantic Views

Once the semantic view is live, Cortex Analyst automatically surfaces it. No additional registration required.

We can now ask:

  • “Show total sales by category.”
  • “Average order value by brand”
  • “Top 5 products this month”
  • “Sales trend by signup month”
  • “Compare sales between mobile and web”

These are converted into precise SQL queries using only the defined metrics, dimensions, and relationships — no hallucinations.

Enhancing Cortex Accuracy with Custom Instructions

Although we can’t directly give prompts to Cortex Analyst like ChatGPT, Snowflake enables smart modeling hints:

  • WITH SYNONYMS: Helps match words like “client” to CUSTOMER_NAME
  • Time buckets: Add signup_month, order_week, etc. for temporal logic
  • Helper fields: Precompute flags like is_repeat_customer, order_count
  • Naming conventions: Use intuitive names (total_sales, avg_order_value)

These model-layer cues guide the LLM to parse questions correctly and avoid hallucinations.

Enriching Semantic Understanding with External Metadata

Snowflake enhances Cortex Analyst’s comprehension by integrating its semantic model with external data catalogs, BI tools, and metadata systems.

This integration with sources like Tableau, Collibra, or Alation enables Snowflake to ingest valuable additional context, including information on column usage, data lineage, synonyms, and relationships. This significantly improves Cortex’s ability to interpret ambiguous or high-level natural language queries.

Specific examples of how these connections enrich the semantic views include:

  • From Tableau/BI tools: Capturing semantic hints derived from field usage and visualization metadata.
  • From Metadata Catalogs (e.g., Collibra): Enriching semantic views with business glossary terms and entity relationships.
  • From external APIs or integrations: Feeding usage context or domain-specific dictionaries to further refine natural language query interpretation.


These continuous connections foster a smarter semantic layer, transforming it into a self-improving mesh of meaning that consistently adapts to an organization’s evolving data language.

What’s Happening Under the Hood

When a user interacts with Cortex Analyst, Snowflake leverages the semantic view to execute a series of intelligent steps:

  1. Natural language parsing: The user’s question is transformed into a structured intent.
  2. Semantic resolution: Unlike traditional Text-to-SQL models that infer joins or columns, Cortex directly maps terms to predefined dimensions, facts, and metrics within your semantic view.
  3. Governed SQL generation: Cortex constructs queries that exclusively utilize authorized fields, adhere to modeled relationships, and respect RBAC (Role-Based Access Control) limitations.
  4. Query execution: The generated SQL is executed using Snowflake’s compute capabilities, delivering real-time results to the user.


This eliminates redundant modeling across tools, minimizes the risk of errors, and avoids hallucinations from generic Text-to-SQL tools. The logic is no longer scattered across ETL, BI, and notebooks — it’s all in one governed layer inside your warehouse.


Cost Considerations

  • Semantic Views are metadata objects that incur no compute cost for definition or storage.
  • Cortex Analyst queries utilize Snowflake compute, billed against your warehouse credits.

Best practice: Dedicate a separate virtual warehouse for Cortex queries to facilitate monitoring and cost control.

Privileges Required

To create and access Semantic Views via Cortex Analyst, the following roles and privileges are required:

  • CREATE SEMANTIC VIEW on the target schema
  • USAGE on the involved database and schema
  • SELECT on the base tables used in the semantic view
  • USAGE and OPERATE on the warehouse, Cortex utilizes


Additionally, if you are implementing row-level access through secure views or dynamic data masking, ensure you also grant RBAC filters.

Conclusion

Semantic Views + Cortex Analyst shift analytics from brittle, tool‑specific semantics to a governed, warehouse‑native model — enabling natural‑language access without sacrificing consistency or control. You standardise metrics once, expose them everywhere, and give teams a faster path from question to answer.

Next steps

  • Start with one domain (e.g., Sales) and 5–10 high‑value questions
  • Define synonyms, time buckets, and two or three core metrics
  • Add validation checks and publish the view to Cortex
  • Roll out usage analytics and iterate on what people actually ask

Appendix

Prompts to Try:

  • Total sales by region and channel
  • Average order value by category
  • Sales trend by signup month
  • Top-performing brands this quarter
  • Compare customer activity across regions

Next Steps

  • Expand metrics: retention, conversion, repeat buyers
  • Use Cortex Search to explore documents alongside analytics
  • Publish and version-control your semantic views

References

  1. Overview of semantic views | Snowflake Documentation
  2. Snowflake’s Native Semantic Views: AI-Powered BI for the Enterprise

About kipi.ai

Kipi.ai, a WNS Company, is a global leader in data modernization and democratization focused on the Snowflake platform. Headquartered in Houston, Texas, Kipi.ai enables enterprises to unlock the full value of their data through strategy, implementation and managed services across data engineering, AI-powered analytics and data science.

As a Snowflake Elite Partner, Kipi.ai has one of the world’s largest pools of Snowflake-certified talent—over 600 SnowPro certifications—and a portfolio of 250+ proprietary accelerators, applications and AI-driven solutions. These tools enable secure, scalable and actionable data insights across every level of the enterprise. Serving clients across banking and financial services, insurance, healthcare and life sciences, manufacturing, retail and CPG, and hi-tech and professional services, Kipi.ai combines deep domain excellence with AI innovation and human ingenuity to co-create smarter businesses. As a part of WNS, Kipi.ai brings global scale and execution strength to accelerate Snowflake-powered transformation world-wide.

For more information, visit www.kipi.ai.

August 12, 2025