Skip to main content
Community Hub
TL;DR

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.

Your AI can read this via Docs MCPInstall MCP →Connect

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:

Deploy your context repository

  1. Open your context repository and click the Portability tab. Each target engine has its own card.

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

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

  4. Click Deploy on the card. The card expands to ask where the semantic view goes.

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

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

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

    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.

  1. Open the repository and go to the Overview tab.
  2. Update the linked assets or custom instructions and regenerate, or describe the change in the chat window. See Update the context repository.
  3. Re-run your question set through Run simulations to confirm nothing has regressed.
  4. Go back to Portability, preview the file, and click Deploy. CES replaces the existing semantic view in place.

Next steps