
## Deploy to Snowflake Cortex Analyst

URL: https://docs.atlan.com/product/capabilities/governance/context-engineering-studio/how-tos/deploy-snowflake

> Deploy a context repository from Context Engineering Studio to Snowflake Cortex Analyst as a Semantic View. Grant access to your business users, verify the view in Snowflake, and monitor live query traces in the Observe tab.

<!-- vale Microsoft.Headings = NO -->

# Deploy to Snowflake Cortex Analyst 

<!-- vale Microsoft.Headings = YES -->

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, and the **Observe tab** streams live query traces back into CES for iteration.

## Prerequisites

Before you begin, make sure:

- You've built a context repository and the initial semantic model is generated. See [Build your context repository](https://docs.atlan.com/llms/governance/context-engineering-studio/build/llms.txt).
- Your simulations pass consistently with no regressions. See [Run simulations](https://docs.atlan.com/llms/governance/context-engineering-studio/simulate/llms.txt).
- The required Snowflake grants are in place. See [Grant Snowflake permissions](https://docs.atlan.com/llms/governance/context-engineering-studio/grant-snowflake-permissions/llms.txt).

## Deploy your context repository

1. In the **Context Engineering Studio** chat window, tell the agent you want to deploy to Snowflake Cortex Analyst. CES generates the Snowflake-specific deployment artifacts for your repository.

 ```
 Deploy to Snowflake Cortex Analyst.
 ```

 If you specified a deployment target when building, the artifacts may already be in your repository. Continue to the next step.

2. From your context repository, click **Portability**.

3. Select **Snowflake Cortex Analyst**. CES creates a Cortex Analyst semantic view at the fully qualified location you specify.

4. Enter the **Database**, **Schema**, and **Semantic View name** (for example, `FINANCIAL_REPORTING_BUDGETS`). All three fields are required and must be valid SQL identifiers (letters, digits, underscores; can't start with a digit).

5. 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.

1. Grant your business users access to query the semantic view through Cortex Analyst. Replace `<consumer_role>` with the Snowflake role assigned to your users.

 ```sql
 -- Grant access to a specific semantic view
 GRANT 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 schema
 GRANT 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>;
 ```

2. Verify the semantic view is available in your target schema.

 ```sql
 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.

<!-- vale Microsoft.Headings = NO -->

## Monitor with Observe tab

<!-- vale Microsoft.Headings = YES -->

The Observe tab surfaces live production query traces so you can act on real user failures without leaving CES.

1. Open the **Observe** tab in your context repository. Each trace shows the question a user asked, the SQL Cortex Analyst generated, the result, and any feedback the user left.

2. For a failing trace, click **Suggest fixes** to get AI-proposed YAML changes. Review the suggestion, then click **Apply and retest** to validate it with your question set.

3. For a passing trace, click **Promote** to add it to your question set as a verified question/query pair. This seeds the next simulation with real production examples.

4. If a production query surfaces a business term that isn't in your model, click **Extract term** to add it to your Atlan glossary and map it back to the relevant column.

Failures you fix and promote become part of the question set, which drives the next certification cycle.

## 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), create a new draft from the certified model, make your changes, and deploy again. The existing semantic view is replaced atomically, so end users experience no downtime and existing grants are preserved.

1. From your context repository, click **Edit**. CES creates a new draft from the current certified model.
2. Make your changes through the chat window or the YAML editor.
3. Re-run your question set through [Run simulations](https://docs.atlan.com/llms/governance/context-engineering-studio/simulate/llms.txt) to confirm nothing has regressed.
4. Click **Deploy**. CES replaces the existing semantic view in place. All previous certification versions are retained in the repository history.

## Next steps

- [Run simulations](https://docs.atlan.com/llms/governance/context-engineering-studio/simulate/llms.txt): re-run your question set on the deployed view and iterate on failures.
- [Grant Snowflake permissions](https://docs.atlan.com/llms/governance/context-engineering-studio/grant-snowflake-permissions/llms.txt): troubleshoot permission issues using the Configure tab preflight check.
- [What is Context Engineering Studio?](https://docs.atlan.com/llms/governance/context-engineering-studio/what-is-context-engineering-studio/llms.txt): understand the full build, test, improve, and deploy lifecycle.

---
