7 minute read
28 July 2026
As Snowflake continues to expand its native AI capabilities, Cortex Analyst and Cortex Agent have become powerful tools for natural-language analytics. A well-designed semantic view sits at the heart of these experiences: it connects business logic, metadata, and user intent to the underlying Snowflake objects that store your data.
A semantic view is a structured YAML definition of your data domain that tells Cortex Analyst and other consumers of the semantic layer:
It is essentially a translation layer between human questions and Snowflake SQL, helping Snowflake AI produce more accurate, governed outputs.
Below is a simplified example of the overall YAML structure, including logical tables, dimensions, time dimensions, facts, metrics, and relationships.
{"type":"richText","children":[{"type":"paragraph","children":[{"text":"name:\u0026nbsp;workforce_analytics\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"description: Semantic view for HR and workforce reporting\u0026nbsp;"}]},{"type":"paragraph","children":[{"text":"tables:\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"- name: employees\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202Fdescription: One row per employee\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202Fbase_table:\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fdatabase:\u0026nbsp;hr_db\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fschema: reporting\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Ftable: employees\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202Fdimensions:\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F- name:\u0026nbsp;employee_id\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fdescription: Unique employee identifier\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fexpr: EMPLOYEE_ID\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fdata_type: VARCHAR\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fsynonyms:\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202F- emp id\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202F- employee number\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F- name:\u0026nbsp;department_id\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fdescription: Department key\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fexpr: DEPT_ID\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fdata_type: VARCHAR\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202Ftime_dimensions:\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F- name:\u0026nbsp;hire_date\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fdescription: Date the employee joined\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fexpr: HIRE_DATE\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fdata_type: DATE\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202Ffacts:\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F- name:\u0026nbsp;employee_count_fact\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fdescription: Row-level employee counting fact\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fexpr: 1\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fdata_type: NUMBER\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202Fmetrics:\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F- name:\u0026nbsp;employee_count\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fdescription: Total number of employees\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fexpr: COUNT(*)\u0026nbsp;"}]},{"type":"paragraph","children":[{"text":"\u0026nbsp;"}]},{"type":"paragraph","children":[{"text":"- name: departments\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202Fdescription: Department dimension table\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202Fbase_table:\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fdatabase:\u0026nbsp;hr_db\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fschema: reporting\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Ftable: departments\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202Fdimensions:\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F- name:\u0026nbsp;department_id\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fdescription: Department key\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fexpr: DEPT_ID\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fdata_type: VARCHAR\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fsynonyms:\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202F- department key\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202F- department id\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F- name:\u0026nbsp;department_name\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fdescription: Name of department\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fexpr: DEPT_NAME\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fdata_type: VARCHAR\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fsynonyms:\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202F- department\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202F- department name\u0026nbsp;"}]},{"type":"paragraph","children":[{"text":"\u0026nbsp;"}]},{"type":"paragraph","children":[{"text":"relationships:\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"- name:\u0026nbsp;employees_to_departments\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202Fleft_table: employees\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202Fright_table: departments\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202Frelationship_columns:\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F-\u0026nbsp;left_column:\u0026nbsp;department_id\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202Fright_column:\u0026nbsp;department_id\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202Frelationship_type: many_to_one\u0026nbsp;"}]}]}Metrics define the aggregated business values that end users usually want to ask about, such as total sales, average order value, headcount, or attrition rate. In a semantic view, metrics sit above the row-level data and encode how a value should be calculated consistently whenever it is used.
This is an important distinction from facts. Facts represent row-level numeric values or atomic quantitative elements in a logical table, while metrics represent business-ready aggregations or derived calculations built for analysis. In practice, dimensions answer "by what", facts describe the underlying quantitative data, and metrics answer "what number should we report".
Metrics are especially useful because they centralise business logic. Instead of relying on every analyst or generated query to independently define revenue, employee count, or profit margin, you define the metric once in the semantic view and reuse it consistently across Analyst, Agent, and BI use cases.
{"type":"richText","children":[{"type":"paragraph","children":[{"type":"span","class":"NormalTextRun SCXW48426956 BCX0","children":[{"text":"metrics:"}]},{"type":"span","class":"LineBreakBlob BlobObject DragDrop SCXW48426956 BCX0","children":[{"type":"span","class":"SCXW48426956 BCX0","children":[{"text":"\u0026nbsp;"}]},{"type":"br","class":"SCXW48426956 BCX0","children":[{"text":""}]}]},{"type":"span","class":"TextRun SCXW48426956 BCX0","lang":"EN-AU","xml:lang":"EN-AU","data-contrast":"auto","children":[{"type":"span","class":"NormalTextRun SCXW48426956 BCX0","children":[{"text":"- name:\u0026nbsp;"}]},{"type":"span","class":"NormalTextRun SCXW48426956 BCX0","children":[{"text":"employee_count"}]}]},{"type":"span","class":"LineBreakBlob BlobObject DragDrop SCXW48426956 BCX0","children":[{"type":"span","class":"SCXW48426956 BCX0","children":[{"text":"\u0026nbsp;"}]},{"type":"br","class":"SCXW48426956 BCX0","children":[{"text":""}]}]},{"type":"span","class":"NormalTextRun SCXW48426956 BCX0","children":[{"text":"\u202F\u202Fdescription: Total number of employees"}]},{"type":"span","class":"LineBreakBlob BlobObject DragDrop SCXW48426956 BCX0","children":[{"type":"span","class":"SCXW48426956 BCX0","children":[{"text":"\u0026nbsp;"}]},{"type":"br","class":"SCXW48426956 BCX0","children":[{"text":""}]}]},{"type":"span","class":"TextRun SCXW48426956 BCX0","lang":"EN-AU","xml:lang":"EN-AU","data-contrast":"auto","children":[{"type":"span","class":"NormalTextRun SCXW48426956 BCX0","children":[{"text":"\u202F\u202Fexpr:\u0026nbsp;"}]},{"type":"span","class":"NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW48426956 BCX0","children":[{"text":"COUNT("}]},{"type":"span","class":"NormalTextRun SCXW48426956 BCX0","children":[{"text":"*)"}]}]},{"type":"span","class":"LineBreakBlob BlobObject DragDrop SCXW48426956 BCX0","children":[{"type":"span","class":"SCXW48426956 BCX0","children":[{"text":"\u0026nbsp;"}]},{"type":"br","class":"SCXW48426956 BCX0","children":[{"text":""}]}]},{"type":"span","class":"TextRun SCXW48426956 BCX0","lang":"EN-AU","xml:lang":"EN-AU","data-contrast":"auto","children":[{"type":"span","class":"NormalTextRun SCXW48426956 BCX0","children":[{"text":"- name:\u0026nbsp;"}]},{"type":"span","class":"NormalTextRun SCXW48426956 BCX0","children":[{"text":"average_tenure_years"}]}]},{"type":"span","class":"LineBreakBlob BlobObject DragDrop SCXW48426956 BCX0","children":[{"type":"span","class":"SCXW48426956 BCX0","children":[{"text":"\u0026nbsp;"}]},{"type":"br","class":"SCXW48426956 BCX0","children":[{"text":""}]}]},{"type":"span","class":"NormalTextRun SCXW48426956 BCX0","children":[{"text":"\u202F\u202Fdescription: Average employee tenure in years"}]},{"type":"span","class":"LineBreakBlob BlobObject DragDrop SCXW48426956 BCX0","children":[{"type":"span","class":"SCXW48426956 BCX0","children":[{"text":"\u0026nbsp;"}]},{"type":"br","class":"SCXW48426956 BCX0","children":[{"text":""}]}]},{"type":"span","class":"TextRun SCXW48426956 BCX0","lang":"EN-AU","xml:lang":"EN-AU","data-contrast":"auto","children":[{"type":"span","class":"NormalTextRun SCXW48426956 BCX0","children":[{"text":"\u202F\u202Fexpr:\u0026nbsp;"}]},{"type":"span","class":"NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW48426956 BCX0","children":[{"text":"AVG("}]},{"type":"span","class":"NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW48426956 BCX0","children":[{"text":"DATEDIFF("}]},{"type":"span","class":"NormalTextRun SCXW48426956 BCX0","children":[{"text":"\u0027day\u0027, HIRE_DATE, CURRENT_"}]},{"type":"span","class":"NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW48426956 BCX0","children":[{"text":"DATE("}]},{"type":"span","class":"NormalTextRun SCXW48426956 BCX0","children":[{"text":")) / 365.25)"}]}]},{"type":"span","class":"EOP Selected SCXW48426956 BCX0","data-ccp-props":"{}","children":[{"text":"\u0026nbsp;"}]}]}]}You can also create derived metrics that combine logic across tables or reuse existing business definitions. This makes the metrics section one of the most important parts of the semantic view for ensuring that generated answers align with how the business actually measures performance.
There are optional features you can include in your semantic view to improve the accuracy, consistency, and trustworthiness of Cortex Analyst and Agent.
Verified queries allow you to provide example SQL statements that demonstrate:
These examples guide the model’s reasoning and reduce mistakes.
{"type":"richText","children":[{"type":"paragraph","children":[{"type":"span","class":"TextRun SCXW259591327 BCX0","lang":"EN-AU","xml:lang":"EN-AU","data-contrast":"auto","children":[{"type":"span","class":"NormalTextRun SpellingErrorV2Themed SCXW259591327 BCX0","children":[{"text":"verified_queries"}]},{"type":"span","class":"NormalTextRun SCXW259591327 BCX0","children":[{"text":":"}]}]},{"type":"span","class":"LineBreakBlob BlobObject DragDrop SCXW259591327 BCX0","children":[{"type":"span","class":"SCXW259591327 BCX0","children":[{"text":"\u0026nbsp;"}]},{"type":"br","class":"SCXW259591327 BCX0","children":[{"text":""}]}]},{"type":"span","class":"NormalTextRun SCXW259591327 BCX0","children":[{"text":"- name: employee count by department"}]},{"type":"span","class":"LineBreakBlob BlobObject DragDrop SCXW259591327 BCX0","children":[{"type":"span","class":"SCXW259591327 BCX0","children":[{"text":"\u0026nbsp;"}]},{"type":"br","class":"SCXW259591327 BCX0","children":[{"text":""}]}]},{"type":"span","class":"NormalTextRun SCXW259591327 BCX0","children":[{"text":"\u202F\u202Fquestion: What is the employee count by department?"}]},{"type":"span","class":"LineBreakBlob BlobObject DragDrop SCXW259591327 BCX0","children":[{"type":"span","class":"SCXW259591327 BCX0","children":[{"text":"\u0026nbsp;"}]},{"type":"br","class":"SCXW259591327 BCX0","children":[{"text":""}]}]},{"type":"span","class":"TextRun SCXW259591327 BCX0","lang":"EN-AU","xml:lang":"EN-AU","data-contrast":"auto","children":[{"type":"span","class":"NormalTextRun SCXW259591327 BCX0","children":[{"text":"\u202F\u202F"}]},{"type":"span","class":"NormalTextRun SpellingErrorV2Themed SCXW259591327 BCX0","children":[{"text":"sql"}]},{"type":"span","class":"NormalTextRun SCXW259591327 BCX0","children":[{"text":": |"}]}]},{"type":"span","class":"LineBreakBlob BlobObject DragDrop SCXW259591327 BCX0","children":[{"type":"span","class":"SCXW259591327 BCX0","children":[{"text":"\u0026nbsp;"}]},{"type":"br","class":"SCXW259591327 BCX0","children":[{"text":""}]}]},{"type":"span","class":"TextRun SCXW259591327 BCX0","lang":"EN-AU","xml:lang":"EN-AU","data-contrast":"auto","children":[{"type":"span","class":"NormalTextRun SCXW259591327 BCX0","children":[{"text":"\u202F\u202F\u202F\u202FSELECT\u0026nbsp;"}]},{"type":"span","class":"NormalTextRun SpellingErrorV2Themed SCXW259591327 BCX0","children":[{"text":"department_name"}]},{"type":"span","class":"NormalTextRun SCXW259591327 BCX0","children":[{"text":",\u0026nbsp;"}]},{"type":"span","class":"NormalTextRun SCXW259591327 BCX0","children":[{"text":"employee_count"}]}]},{"type":"span","class":"LineBreakBlob BlobObject DragDrop SCXW259591327 BCX0","children":[{"type":"span","class":"SCXW259591327 BCX0","children":[{"text":"\u0026nbsp;"}]},{"type":"br","class":"SCXW259591327 BCX0","children":[{"text":""}]}]},{"type":"span","class":"NormalTextRun SCXW259591327 BCX0","children":[{"text":"\u202F\u202F\u202F\u202FFROM __employees"}]},{"type":"span","class":"LineBreakBlob BlobObject DragDrop SCXW259591327 BCX0","children":[{"type":"span","class":"SCXW259591327 BCX0","children":[{"text":"\u0026nbsp;"}]},{"type":"br","class":"SCXW259591327 BCX0","children":[{"text":""}]}]},{"type":"span","class":"TextRun SCXW259591327 BCX0","lang":"EN-AU","xml:lang":"EN-AU","data-contrast":"auto","children":[{"type":"span","class":"NormalTextRun SCXW259591327 BCX0","children":[{"text":"\u202F\u202F\u202F\u202FGROUP BY\u0026nbsp;"}]},{"type":"span","class":"NormalTextRun SpellingErrorV2Themed SCXW259591327 BCX0","children":[{"text":"department_name"}]},{"type":"span","class":"NormalTextRun SCXW259591327 BCX0","children":[{"text":",\u0026nbsp;"}]},{"type":"span","class":"NormalTextRun SCXW259591327 BCX0","children":[{"text":"employee_count"}]}]},{"type":"span","class":"LineBreakBlob BlobObject DragDrop SCXW259591327 BCX0","children":[{"type":"span","class":"SCXW259591327 BCX0","children":[{"text":"\u0026nbsp;"}]},{"type":"br","class":"SCXW259591327 BCX0","children":[{"text":""}]}]},{"type":"span","class":"TextRun SCXW259591327 BCX0","lang":"EN-AU","xml:lang":"EN-AU","data-contrast":"auto","children":[{"type":"span","class":"NormalTextRun SCXW259591327 BCX0","children":[{"text":"\u202F\u202F\u202F\u202FORDER BY\u0026nbsp;"}]},{"type":"span","class":"NormalTextRun SpellingErrorV2Themed SCXW259591327 BCX0","children":[{"text":"employee_count"}]},{"type":"span","class":"NormalTextRun SCXW259591327 BCX0","children":[{"text":"\u0026nbsp;DESC"}]}]},{"type":"span","class":"EOP Selected SCXW259591327 BCX0","data-ccp-props":"{}","children":[{"text":"\u0026nbsp;"}]}]}]}Custom instructions allow you to encode global rules and steer the model away from incorrect assumptions. These instructions help guide how Analyst or Agent should interpret your semantic layer and generate SQL.
Typical use cases include:
{"type":"richText","children":[{"type":"paragraph","children":[{"text":"module_custom_instructions:\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202Fsql_generation: |\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202FAlways join employees to departments using\u0026nbsp;department_id.\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202FInterpret headcount as\u0026nbsp;employee_count\u0026nbsp;unless the user specifies otherwise.\u0026nbsp;"},{"type":"br","children":[{"text":""}]},{"text":"\u202F\u202F\u202F\u202FUse the organisation\u0027s fiscal year definition when answering year-based questions.\u0026nbsp;"}]},{"type":"paragraph","children":[{"text":"\u0026nbsp;"}]}]}These dramatically improve reliability.
Filters allow you to define reusable constraints that Snowflake can automatically apply.
Common examples are:
{"type":"richText","children":[{"type":"paragraph","children":[{"type":"span","class":"NormalTextRun BCX0 SCXW23672761","children":[{"text":"filters:"}]},{"type":"span","class":"LineBreakBlob BlobObject DragDrop BCX0 SCXW23672761","children":[{"type":"span","class":"BCX0 SCXW23672761","children":[{"text":"\u0026nbsp;"}]},{"type":"br","class":"BCX0 SCXW23672761","children":[{"text":""}]}]},{"type":"span","class":"TextRun BCX0 SCXW23672761","lang":"EN-AU","xml:lang":"EN-AU","data-contrast":"auto","children":[{"type":"span","class":"NormalTextRun BCX0 SCXW23672761","children":[{"text":"- name: "}]},{"type":"span","class":"NormalTextRun BCX0 SCXW23672761","children":[{"text":"active_employees"}]}]},{"type":"span","class":"LineBreakBlob BlobObject DragDrop BCX0 SCXW23672761","children":[{"type":"span","class":"BCX0 SCXW23672761","children":[{"text":"\u0026nbsp;"}]},{"type":"br","class":"BCX0 SCXW23672761","children":[{"text":""}]}]},{"type":"span","class":"NormalTextRun BCX0 SCXW23672761","children":[{"text":"\u202F\u202Fdescription: Include only active employees"}]},{"type":"span","class":"LineBreakBlob BlobObject DragDrop BCX0 SCXW23672761","children":[{"type":"span","class":"BCX0 SCXW23672761","children":[{"text":"\u0026nbsp;"}]},{"type":"br","class":"BCX0 SCXW23672761","children":[{"text":""}]}]},{"type":"span","class":"NormalTextRun BCX0 SCXW23672761","children":[{"text":"\u202F\u202Fexpr: STATUS = \u0027ACTIVE\u0027"}]},{"type":"span","class":"LineBreakBlob BlobObject DragDrop BCX0 SCXW23672761","children":[{"type":"span","class":"BCX0 SCXW23672761","children":[{"text":"\u0026nbsp;"}]},{"type":"br","class":"BCX0 SCXW23672761","children":[{"text":""}]}]},{"type":"span","class":"TextRun BCX0 SCXW23672761","lang":"EN-AU","xml:lang":"EN-AU","data-contrast":"auto","children":[{"type":"span","class":"NormalTextRun BCX0 SCXW23672761","children":[{"text":"- name: "}]},{"type":"span","class":"NormalTextRun BCX0 SCXW23672761","children":[{"text":"exclude_test_records"}]}]},{"type":"span","class":"LineBreakBlob BlobObject DragDrop BCX0 SCXW23672761","children":[{"type":"span","class":"BCX0 SCXW23672761","children":[{"text":"\u0026nbsp;"}]},{"type":"br","class":"BCX0 SCXW23672761","children":[{"text":""}]}]},{"type":"span","class":"NormalTextRun BCX0 SCXW23672761","children":[{"text":"\u202F\u202Fdescription: Exclude test employees"}]},{"type":"span","class":"LineBreakBlob BlobObject DragDrop BCX0 SCXW23672761","children":[{"type":"span","class":"BCX0 SCXW23672761","children":[{"text":"\u0026nbsp;"}]},{"type":"br","class":"BCX0 SCXW23672761","children":[{"text":""}]}]},{"type":"span","class":"NormalTextRun BCX0 SCXW23672761","children":[{"text":"\u202F\u202Fexpr: EMPLOYEE_NAME NOT ILIKE \u0027%TEST%\u0027"}]},{"type":"span","class":"EOP Selected BCX0 SCXW23672761","data-ccp-props":"{}","children":[{"text":"\u0026nbsp;"}]}]}]}Filters help to maintain consistent business definitions across all generated queries.
Semantic views are one of the most important components of a Snowflake Cortex Analyst or Agent implementation. The more clearly you define dimensions, facts, metrics, relationships, filters, and guidance, the more reliable and consistent the generated answers become. Starting with a basic model is fine, but adding metrics, verified queries, custom instructions, and filters turns your Snowflake AI into a more trustworthy analytics assistant that reflects your organisation's business logic.
Other insights

Subscribe to Altis
Join our mailing list to receive the latest updates, expert insights and event news.