> For the complete documentation index, see [llms.txt](https://docs.zenlytic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zenlytic.com/data-modeling/context_manager.md).

# Context Manager

Manage model files, validate changes, compare branches, and deploy updates to production.

Use Context Manager to manage semantic model files, review changes, and deploy updates to production.

## Open Context Manager

Open Context Manager from the workspace navigation or from chat.

![Open Context Manager entry points](https://1577702444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9EV2yuH6oO9jfgfgYUW%2Fuploads%2Fgit-blob-d35e830da0b77e35b2890b250533a0dbb5f533ea%2Fcontext-manager-entry-points.png?alt=media) ![Context Manager overview](https://1577702444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9EV2yuH6oO9jfgfgYUW%2Fuploads%2Fgit-blob-2f9fdcf95caafab138c4e16adb80208c96974742%2Fcontext-manager-overview.png?alt=media)

## Manage files

Use the file tree to organize and maintain your data model:

* Create files and folders
* Rename files and folders
* Open view and model files in the editor
* Access file actions from the three-dot menu

Use the three-dot menu to:

* Show documentation for view and model files
* Open database preview for view files

![Context tab file tree](https://1577702444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9EV2yuH6oO9jfgfgYUW%2Fuploads%2Fgit-blob-6a6c240b1cb9a15d67ddef5a702f7aeff4f537b9%2Fcontext-manager-file-tree.png?alt=media) ![Three-dot menu actions](https://1577702444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9EV2yuH6oO9jfgfgYUW%2Fuploads%2Fgit-blob-87e202d620025595cba31404c37add5b093a3732%2Fcontext-manager-file-menu.png?alt=media)

## Add to the data model

Use the **Add** button to create or upload assets:

* **Add view**
* **Add model**
* **Add skill**
* **Create file**
* **Create folder**
* **Upload file**

When you add a view, choose one of these options:

* Upload a CSV file
* Add from a database connection

Use an existing connection or create a new connection during setup.

![Add button options](https://1577702444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9EV2yuH6oO9jfgfgYUW%2Fuploads%2Fgit-blob-6acde97c76d66577f3ef7bc797f37dd8c54e86d7%2Fcontext-manager-add-options.png?alt=media) ![Add view modal](https://1577702444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9EV2yuH6oO9jfgfgYUW%2Fuploads%2Fgit-blob-63d7930fccc74b524394c2c586c0503343e74370%2Fcontext-manager-add-view.png?alt=media)

## Edit, validate, and review changes

Edit files directly in the text editor. In Compare Changes or Deploy Changes, review the changed files and their counts of additions, changes, and removals. Select a file in the file tree to inspect it. For an edited view, use **Show only changed** to focus on modified rows, or switch to **Code** to inspect the YAML diff.

Validation issues appear in the branch banner and beside affected files. Open **Validation** in the banner to review issues, or use an affected file’s issue indicator to see what needs fixing. Deleted files show a summary; select **Show what's being removed** to inspect their previous contents.

![Editor with validation panel](https://1577702444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9EV2yuH6oO9jfgfgYUW%2Fuploads%2Fgit-blob-5a2ecfbe4ad17bd4e200a248b033330d6d5720ec%2Fcontext-manager-editor-validation.png?alt=media) ![Diff view](https://1577702444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9EV2yuH6oO9jfgfgYUW%2Fuploads%2Fgit-blob-2d839cef12c6420e1eac2bf83138353c3db0c103%2Fcontext-manager-diff-view.png?alt=media)

Review YAML key documentation by hovering over keys in the text editor.

![Tooltip with documentation](https://1577702444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9EV2yuH6oO9jfgfgYUW%2Fuploads%2Fgit-blob-0ee895a526a2d36d75bbc63935ce85cc1e9394c1%2Fcontext-manager-editor-yml-tooltips.png?alt=media)

## Work with branches safely

Use the branch selector to work in non-production branches.

Disable the workspace setting that allows direct edits on the production branch to enforce a branch-based workflow.

![Branch selector](https://1577702444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9EV2yuH6oO9jfgfgYUW%2Fuploads%2Fgit-blob-495d20d255f539aafd3e4ea7a2eb258ce0b84ae8%2Fcontext-manager-branch-selector.png?alt=media) ![Disable production edits setting](https://1577702444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9EV2yuH6oO9jfgfgYUW%2Fuploads%2Fgit-blob-392a4080b80f54eee3019a2f9ec409a833138201%2Fcontext-manager-disable-production-edits.png?alt=media)

## Deploy to production

After you commit changes on a development branch, use the deploy action to publish to production.

If the branch has validation errors, **Commit Changes** is unavailable in Deploy Changes. Fix the errors, then review and deploy the changes.

![Deploy action](https://1577702444-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT9EV2yuH6oO9jfgfgYUW%2Fuploads%2Fgit-blob-333b68a06b6aa8b661dcba4b337719bdd21303df%2Fcontext-manager-deploy.png?alt=media)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zenlytic.com/data-modeling/context_manager.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
