
## Deploy to Databricks Genie

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

> Deploy a context repository in Context Engineering Studio to Databricks Genie. CES pushes descriptions into Unity Catalog, creates one Metric View per table, and configures a Genie Space. On Databricks, deploying is part of the build cycle because Chat and build and Simulate run on the live Genie Space.

# Deploy to Databricks Genie 

Atlan's Context Engineering Studio deploys governed context to Databricks Genie—pushing descriptions into Unity Catalog, creating a Metric View per table, and configuring a Genie Space.

Deploying to Databricks Genie pushes descriptions into Unity Catalog, creates one **Metric View** per table in your target schema, and configures a **Genie Space** backed by those views. On Databricks, deploying is part of the build cycle, not the end of it. Chat & build and Simulate both run on a live Genie Space, so you deploy first to create it, then refine, simulate, and re-deploy for production. Re-deploys replace existing Metric Views in place and patch the Genie Space without recreating it.

## 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).
- The required Databricks grants are in place. See [Grant Databricks permissions](https://docs.atlan.com/llms/governance/context-engineering-studio/grant-databricks-permissions/llms.txt).

## Deploy your context repository

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

 ```
 Deploy to Databricks Genie.
 ```

 If you specified a deployment target when building, the artifacts may already be in your repository. On Databricks, an initial deploy is required before you can simulate, since it creates the Genie Space that Chat & build and Simulate run on.

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

3. Select **Databricks Genie**. CES creates Metric Views in Unity Catalog and configures a Genie Space at the location you specify.

4. Enter the **Catalog**, **Schema**, and **Genie Space name** (for example, `FINANCIAL_REPORTING_BUDGETS`). All three fields are required and must be valid identifiers.

5. Click **Deploy**.

After deployment, the repository is wired to the Genie Space and ready for Chat & build, Simulate, and end-user queries. See [Run simulations](https://docs.atlan.com/llms/governance/context-engineering-studio/simulate/llms.txt).

## Grant access and verify

After the production deploy, grant end users access and confirm the artifacts are visible in Databricks.

1. Grant your business users access to the Metric Views. Run in a Databricks SQL editor, replacing `<consumer_group>` with the group assigned to your users.

 ```sql
 GRANT USE CATALOG ON CATALOG <target_catalog> TO `<consumer_group>`;
 GRANT USE SCHEMA ON SCHEMA <target_catalog>.<target_schema> TO `<consumer_group>`;
 GRANT SELECT ON VIEW <target_catalog>.<target_schema>.<metric_view_name> TO `<consumer_group>`;
 ```

2. Grant access to the Genie Space via the Databricks workspace UI.

 - Open the Genie Space in your Databricks workspace.
 - Go to **Settings → Permissions**.
 - Add end-user groups with **CAN RUN** (can ask questions) or **CAN VIEW** (can view conversations only).
 - Confirm end users have **consumer access** or the **Databricks SQL workspace entitlement**.

 End users don't need direct warehouse permissions. Queries run under the creator's embedded compute credentials, and Genie respects Unity Catalog row and column security.

3. Verify the deployment by confirming in the Databricks workspace that:

 - The Metric Views appear in Unity Catalog under `<target_catalog>.<target_schema>`.
 - The Genie Space is listed under **Genie** in the workspace sidebar and is accessible.

 You can also navigate to the deployed Metric Views in the Atlan catalog. CES crawls them automatically after deployment.

## Update deployed context repository

After a repository is live, use this process to make changes without disrupting end users. The existing Metric Views and Genie Space stay active until the new version is deployed.

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 Metric Views and patches the Genie Space in place. All previous versions are retained in the repository history.

## Next steps

- [Run simulations](https://docs.atlan.com/llms/governance/context-engineering-studio/simulate/llms.txt): run your question set on the live Genie Space and iterate on failures.
- [Grant Databricks permissions](https://docs.atlan.com/llms/governance/context-engineering-studio/grant-databricks-permissions/llms.txt): troubleshoot permission issues if deployment fails.
- [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.

---
