Deploy a context repository from Context Engineering Studio to Snowflake Cortex Analyst as a Semantic View, then grant access to your business users and verify the view in Snowflake.
Deploy to Snowflake Cortex Analyst
Deploying to Snowflake Cortex Analyst publishes your context repository as a Snowflake Semantic View, creates it in your target schema, and registers it with Cortex Analyst for natural-language SQL. Once deployed, business users can ask questions through Cortex Analyst.
Prerequisites
Before you begin, make sure:
- You've built a context repository and the initial semantic model is generated. See Build your context repository.
- Your simulations pass consistently with no regressions. See Run simulations.
- The required Snowflake grants are in place. See Grant Snowflake permissions.
Deploy your context repository
-
Open your context repository and click the Portability tab. Each target engine has its own card.
-
Find the Snowflake Cortex Analyst card and check the validation line below the description. It shows whether the model validates against Snowflake, which connection it checked, and when. Click Re-check if the model has changed since the last check.
-
Click Preview YAML to read what Cortex Analyst receives before you ship it.
Start with the comments at the top of the file. They list the decisions CES made for this engine, including any metric it held back and why. See Metrics that aren't emitted.
You can deploy straight from this window, or close it and set the destination first.
-
Click Deploy on the card. The card expands to ask where the semantic view goes.
-
Choose the Database and Schema from the dropdowns, then enter a Semantic View name (for example,
FINANCIAL_REPORTING_BUDGETS).The name must be a valid SQL identifier: letters, digits, and underscores, and it can't start with a digit.
-
Click Deploy.
After deployment, the semantic view is available at <database>.<schema>.<semantic_view_name> and is immediately available to end users through Cortex Analyst.
Grant access and verify
After the semantic view is deployed, grant end users access and confirm the view is visible in Snowflake.
-
Grant your business users access to query the semantic view through Cortex Analyst. Replace
<consumer_role>with the Snowflake role assigned to your users.-- Grant access to a specific semantic viewGRANT REFERENCES, SELECT ON SEMANTIC VIEW <target_database>.<target_schema>.<semantic_view_name>TO ROLE <consumer_role>;-- Grant access to all future semantic views in the schemaGRANT SELECT ON FUTURE SEMANTIC VIEWS IN SCHEMA <target_database>.<target_schema>TO ROLE <consumer_role>;GRANT REFERENCES ON FUTURE SEMANTIC VIEWS IN SCHEMA <target_database>.<target_schema>TO ROLE <consumer_role>; -
Verify the semantic view is available in your target schema.
SHOW SEMANTIC VIEWS IN SCHEMA <target_database>.<target_schema>;You can also navigate to the deployed semantic view in the Atlan catalog. CES crawls it automatically after deployment and links it back to the context repository.
Update deployed context repository
After a repository is live, use this process to make changes without disrupting end users. The existing semantic view stays active until the new version is deployed.
To update a deployed context repository (for example, to add a new metric or fix a definition), update the repository and deploy again. The existing semantic view is replaced atomically, so end users experience no downtime and existing grants are preserved.
- Open the repository and go to the Overview tab.
- Update the linked assets or custom instructions and regenerate, or describe the change in the chat window. See Update the context repository.
- Re-run your question set through Run simulations to confirm nothing has regressed.
- Go back to Portability, preview the file, and click Deploy. CES replaces the existing semantic view in place.
Next steps
- Run simulations: re-run your question set on the deployed view and iterate on failures.
- Grant Snowflake permissions: troubleshoot permission issues using the Configure tab preflight check.
- What is Context Engineering Studio?: understand the full build, test, improve, and deploy lifecycle.