Skip to main content

Build your context repository Private Preview

This guide walks you through creating a context repository, generating an initial semantic model from your catalog, and refining definitions until the model reflects how your business thinks.

Setup, configuration, and deployment steps differ between Snowflake Cortex Analyst and Databricks Genie. Engine-specific differences are called out throughout this guide.

Prerequisites

Before you begin, make sure:

  • Context Engineering Studio is enabled on your workspace and your team has the CES persona. See Enable Context Engineering Studio.
  • The Atlan service account has the required permissions granted on your query engine.
  • You've identified a domain to start with. Start narrow. A good first context repository covers a popular dashboard with high query volume. Pick an accessible domain expert who can confirm whether answers are correct, then expand to adjacent domains as separate repositories.

Connect your query engine

Before building a context repository, you need to connect Context Engineering Studio to your query engine. This is a one-time step per workspace. Once connected, you can create multiple context repositories without reconnecting.

  1. In Context Engineering Studio, click Configure in the top navigation.

  2. Under Snowflake Connection, click Connect. CES supports one Snowflake connection per workspace. If a connection is already configured, remove it before adding a new one.

  3. Select your Snowflake connection from the list of available Atlan connectors.

  4. Select the Warehouse CES uses to execute queries.

  5. Enter the Target database and Target schema where semantic views are deployed.

  6. Click Run preflight check. CES verifies authentication, warehouse access, schema access, CREATE SEMANTIC VIEW, and Cortex Analyst access.

  7. Fix any failing grant and click Re-run until the preflight passes, then click Save.

Create context repository

  1. In Context Engineering Studio, click Overview, then click New Context Repository.

  2. In the creation prompt, describe your domain and the types of questions the repository must answer. CES uses this description to rank your catalog and suggest the most relevant assets.

    For example:

    Build a context repository for the Sales domain to analyze pipeline performance and revenue.
  3. Under Query engine, select Snowflake Cortex Analyst or Databricks Genie and confirm the connection to use.

  4. Click Create.

Select assets

Once your context repository is created, select the tables, views, and dashboards that cover your domain. CES ranks suggestions by catalog coverage, usage, and lineage.

  1. In the Select Assets panel, review the tables and views CES suggests. Assets are ranked by catalog coverage, usage, and lineage.

    Use the controls at the top of the panel to narrow or expand results:

    • Search for a specific table, view, or dashboard by name.
    • Database/Catalog and Schema dropdowns to scope results.
    • Asset type filter (table, view, materialized view, dashboard, dbt model, Sigma workbook).
    • Tags to filter by Atlan classification.

    Click each asset to see its lineage, usage statistics, and any existing descriptions or glossary linkages.

    tip

    Prefer production schema assets over dev equivalents. Keep scope tight, 3 to 10 core tables produces a more reliable model than a wide one.

  2. In the Refine Your Selection panel, choose which columns to include for each selected asset.

    • Click Select all / Deselect all to adjust quickly.
    • Select columns individually to keep the model focused.

    Include only the columns that answer your target business questions. Exclude internal metadata, ETL audit fields, and surrogate keys that aren't meaningful to business queries. Fewer, well-described columns produce a more accurate semantic model than a wide schema with irrelevant fields.

  3. Click Save Context Repository. CES generates the initial semantic model.

    • Snowflake: generation completes in under a minute. The repository opens in the editor, ready to refine.
    • Databricks: your selection is saved as a draft. Deploy the repository first to create the Metric View and Genie Space. Chat & build and Simulate use those deployed artifacts. See Deploy to Databricks.

Once the repository is ready, you can open the Build tab to review and edit the YAML, or go directly to Chat & build to start refining with natural language.

Next steps