CertSafari
    Databricks Certified Data Analyst Associate· Lessons

    Domain 7 · Lesson 32/39

    Create a Genie space: datasets, warehouse, instructions and trusted assets

    Create Genie Agents (Genie spaces) by defining reasonable sample questions and domain-specific instructions, choosing SQL warehouses, curating Unity Catalog datasets (tables, views...), and vetting queries as Trusted Assets.

    19 min read
    3% of exam
    4 sources
    Published 2 Nov 2026
    Docs as of 31 Oct 2026

    What you will be able to do

    • Choose a small, focused set of Unity Catalog tables, views and metric views for a Genie space, and stay within its 50-object limit
    • Pick a valid SQL warehouse for a Genie space and explain what the permissions and embedded credentials on it do
    • Write a title, description and common questions that help users find a space and start using it
    • Decide between a SQL expression, an example SQL query and a text instruction when teaching Genie business logic
    • Vet parameterized example queries and Unity Catalog SQL functions as trusted assets that produce verified answers

    Key concept

    A Genie space knows only what its author attaches and teaches — Genie answers questions only from the datasets you explicitly attach, and it reads business logic from the instructions, example SQL and functions you add. Every choice you make when you create a space limits or shapes the SQL that Genie can write.

    1.Creating a Genie space and what it starts with

    A Genie space is a natural-language chat interface that a data analyst sets up over a chosen set of Unity Catalog data. Business users then ask it questions in plain English. Databricks now calls these Genie Agents, but the exam and this lesson use the older name, Genie spaces. Users get good answers only if the analyst makes four decisions well: which data to attach, which warehouse runs the generated SQL, which instructions and examples teach the business logic, and which queries are vetted as trusted.

    Creating a space takes three clicks:

    1. Click Genie Agents in the sidebar.
    2. Click New in the upper-right corner.
    3. Choose the data sources to include, then click Create.

    To create or edit a space you need the Databricks SQL entitlement, CAN USE on at least one pro or serverless SQL warehouse, and SELECT on the data. The person who creates a space gets CAN MANAGE on it automatically.

    A new space does not start empty. When you create it, Genie Code launches and suggests context such as table descriptions and example queries. You accept the suggestions you want and reject the rest. Genie also searches for popular workspace queries that ran against the attached assets, using your own credentials. These appear as a notification in the Data tab, and you accept or reject each one in the Review Suggested Queries dialog. This search covers only attached tables. Suppose you built a pre-joined view for the space, but analysts usually query the underlying source table. Genie will not suggest any of those queries.

    Attachment also sets a hard boundary on what Genie can query. If your instructions mention a table that isn't attached, Genie still won't query it. Each user's Unity Catalog permissions still decide what they can read from the tables that are attached.

    Checkpoint 1 of 9· Check yourself

    An analyst builds a pre-joined view for a new Genie space and attaches only that view. Analysts in the workspace usually query the underlying source table directly. What happens when Genie searches for popular workspace queries to suggest?

    Sources1

    2.Curating the Unity Catalog datasets

    A Genie space can hold at most 50 data objects, and tables, views and metric views all count toward that one limit. Turning some of the 68 objects into views does not help. The limit is also not what you should aim for. Databricks recommends five or fewer tables, and fewer columns within them. A space should answer questions about one topic for one audience, not general questions across several domains. Genie picks columns based on their names and descriptions. Every extra table adds columns that Genie might choose by mistake.

    If a topic really needs many tables, combine them before you attach anything. Pre-join related tables into views or metric views. Metric views work especially well because they already define the metrics, dimensions and aggregations. A space can use any data registered in Unity Catalog: managed, external and foreign tables, views, metric views and materialized views. Anything not registered in Unity Catalog cannot be used.

    The quality of the metadata matters as much as which tables you pick. Genie writes SQL using the Unity Catalog column names and descriptions, so build the space on well-annotated tables. Check any AI-generated descriptions before you keep them. Inside the space you can also hide confusing columns and add column synonyms and custom descriptions. These edits apply only to the space and do not overwrite the descriptions stored in Unity Catalog. That means you can tune what one space knows without changing a table that other teams use.

    Checkpoint 2 of 9· Check yourself

    Your Genie space uses a shared customer table that three other teams also query. In the space, you hide two confusing columns and add synonyms and custom descriptions to several others. What happens to the table's metadata in Unity Catalog?

    Checkpoint 3 of 9· Exam question

    A finance team wants to build a comprehensive Genie space by adding all 68 tables and views in their finance schema, hoping to give Genie maximum context for any possible question. What constraint applies here, and what is the better approach?

    Sources123

    3.Choosing the SQL warehouse

    A SQL warehouse is the compute that runs SQL in Databricks (see SQL warehouse as query compute). In a Genie space, the default warehouse runs every SQL statement that Genie generates for every user. Genie spaces accept only two warehouse types: pro and serverless. No other type appears as a valid option. Autoscaling does not change this, and Genie has no separate internal compute engine. Of the two types, Databricks recommends serverless for the best performance. Users feel the effect directly, because each question they ask waits for the query to run on that warehouse.

    A warehouse appears in the picker only if you have permission on it. The minimum is CAN USE. CAN VIEW is not enough, and CAN MANAGE is more than you need. Broad catalog privileges do not help here, because data permissions and compute permissions are separate. To change the warehouse later, you need at least CAN EDIT on the space.

    When you save a warehouse selection, your compute credentials are embedded in the space. Every user's questions then run on the warehouse through those credentials, even users who have no warehouse permission of their own. The embedded credentials cover the warehouse only. Unity Catalog still checks each user's own permissions on the data, so a user who lacks SELECT on a table cannot read it through Genie. If another author changes the warehouse later, that author's credentials replace yours. Generated queries are always read-only, and the warehouse handles concurrency and scaling.

    What the warehouse setting involves
    AspectRule
    Valid warehouse typesPro or serverless; serverless is recommended for performance
    Permission to select itAt least CAN USE on the warehouse
    Permission to change it laterAt least CAN EDIT on the Genie space
    What the embedded credentials grantAccess to the warehouse only, not to data
    Who decides data accessEach end user's own Unity Catalog permissions

    Checkpoint 4 of 9· Match them up

    Match each part of a Genie space's warehouse setting to the rule that governs it.

    Tap a term, then the definition that fits it.

    Checkpoint 5 of 9· Exam question

    A data platform team is setting up a new Genie space for the sales org. While configuring compute, they try to attach a Classic SQL warehouse from the dropdown, but it is not among the valid options. Which warehouse choice should they make instead, and why?

    Checkpoint 6 of 9· Exam question

    An analyst tries to select a SQL warehouse while creating a Genie space, but the warehouse they need never appears in the picker. A workspace admin checks and finds the analyst has broad catalog access but nothing configured on the warehouse itself. What must be granted on the SQL warehouse for it to show up as selectable?

    Sources13

    4.Title, description and sample questions

    These settings help users find the space and know what to ask it. You find them under Configure > Settings.

    • Title: shown in the workspace browser alongside other workspace objects, so name the space in words its users would search for.
    • Description: shown when a user opens the space. It supports Markdown, so you can add formatting and links to reference material.
    • Common questions: optional examples shown on the chat landing page. You can add them when you create the space or later.

    Your own common questions appear first. If you write enough to fill the landing page, only yours appear. If you write fewer, Genie fills the remaining slots with questions it generates. A good set of sample questions covers what the space is actually designed to answer. For a retail sales space, that might be weekly revenue, units sold and returns by store and region. A user who clicks one should get a correct answer.

    Sample questions also matter in a second place: the title of each example SQL query. For each example query, use the way a user would most typically phrase the question as its title. Genie matches incoming questions against these titles. A title written in internal jargon matches fewer real questions than one written the way users talk.

    Checkpoint 7 of 9· Check yourself

    A retail sales space has three author-written common questions, but its chat landing page has room for more. What does a user see when they open the space?

    Sources14

    5.Instructions: SQL expressions first, example SQL next, text last

    Genie knows a lot in general, but it doesn't know your company's terms. Domain-specific instructions teach it what your business terms mean. Databricks recommends a clear order of preference. Define business terms such as metrics, filters and dimensions as SQL expressions in the knowledge store. Show how to answer complex or multi-part questions with example SQL queries. Use text instructions only as a last resort, for global guidance that can't be written as SQL.

    Which instruction type to use
    TypeUse it forExample
    SQL expressionFrequently used metrics, filters or dimensionsrevenue, active_customers, gross_margin, recent_sales
    Example SQL queryHard-to-interpret, multi-part or complex questions"breakdown my team's performance"
    Text instructionGlobal guidance that needs natural language"Always round percentages to two decimal places in summaries."

    SQL wins because it is precise and easy to maintain. Genie is nondeterministic, so plain-text guidance can be read in different ways, while a SQL definition can't. Too many text instructions also lose force, especially in longer conversations, because Genie struggles to tell which guidance matters most. Text instructions apply to every prompt. Logic that matters for only some questions belongs in an example query, a function or a table comment. Write any text instruction specifically: name the condition that triggers it and the exact action Genie should take. Text is also the only way to shape the natural-language summaries Genie writes. SQL examples and expressions have no effect on those summaries.

    An example SQL query pairs a natural question with SQL that answers it. If a user asks the same question, Genie can use the query directly. If the question is only similar, Genie borrows the query's structure. Choose examples that encode logic specific to your organization. In the query below, an opportunity counts as pipeline only if it is tagged that way and not closed, which Genie couldn't guess on its own.

    An example SQL query that teaches company-specific pipeline logicsql
    -- Return our current total open pipeline by region.
      -- Opportunities are only considered pipelines if they are tagged as such.
      SELECT
        a.region__c AS `Region`,
        sum(o.amount) AS `Open Pipeline`
      FROM
        sales.crm.opportunity o
        JOIN sales.crm.accounts a ON o.accountid = a.id
      WHERE
        o.forecastcategory = 'Pipeline' AND
        o.stagename NOT ILIKE '%closed%'
      GROUP BY ALL;

    Instructions must not contradict each other. If your text instructions say to round to two decimals, every example query must also round to two decimals. There are two separate limits. A space can hold 100 instructions: each example query counts as one, each SQL function counts as one, and the whole General instructions text block counts as one. A space can also hold 200 knowledge store snippets, a limit shared by table descriptions, join relationships and SQL expressions. Start with a small set of instructions, ask the space questions yourself, read the SQL it generates, and add more only where Genie gets something wrong.

    Checkpoint 8 of 9· Fill the gap

    This example SQL query teaches Genie a company-specific rule: an opportunity counts as open pipeline only if it is tagged as pipeline and is not closed. Which keyword completes the WHERE clause so the query encodes that rule?

    -- Return our current total open pipeline by region.
      -- Opportunities are only considered pipelines if they are tagged as such.
      SELECT
        a.region__c AS `Region`,
        sum(o.amount) AS `Open Pipeline`
      FROM
        sales.crm.opportunity o
        JOIN sales.crm.accounts a ON o.accountid = a.id
      WHERE
        o.forecastcategory = 'Pipeline'  ? 
        o.stagename NOT ILIKE '%closed%'
      GROUP BY ALL;

    Sources24

    6.Vetting queries as trusted assets

    A trusted asset is logic an author has checked and approved, so users can rely on any answer built from it. There are two kinds: parameterized example SQL queries and SQL functions registered in Unity Catalog. When Genie answers with one of them, the response is marked as a verified answer. For a parameterized query, the answer is verified only when Genie uses the exact text of the query in chat mode. If Genie only borrows ideas from the query to write new SQL, the answer isn't verified. Users who get a verified answer can change the parameter value and run the query again.

    To add a parameter, put the cursor where it belongs and click Add parameter, or type :parameter_name directly. The Parameter details dialog has three settings:

    • Keyword: the parameter's name in the query. You change it by editing the query text.
    • Data type: String (the default), Date, Date and Time, Decimal or Integer.
    • Comment: a description of valid values or limits, which helps Genie pick the right value.

    Set the type carefully. If a user's value doesn't match the type, Genie treats it as the wrong type, and the results can be wrong. A region_start_date left as String is a typical example. You can also add usage guidance to an example query to tell Genie when to use it.

    Use a SQL function when the logic is too complex for a static or parameterized query. Genie supports scalar functions, which return one value, and table-valued functions, which return rows. Genie can call a function with values from the user's question, but it cannot view or modify the function's SQL. That makes functions a good fit for logic that users shouldn't see or that Genie shouldn't change. Two permissions apply. Authors need at least CAN EDIT on the space to add or remove trusted assets. Users need EXECUTE on every function used as a trusted asset.

    The two kinds of trusted asset
    Trusted assetWhen the answer is verifiedPermission users need
    Parameterized example SQL queryWhen the exact query text is used in chat mode; users can edit the parameter and rerunTheir own Unity Catalog access to the data
    SQL function in Unity CatalogWhen Genie calls the function; Genie cannot view or modify its SQLEXECUTE on the function

    Checkpoint 9 of 9· Check yourself

    Two users chat with a sales space that has a parameterized example query, "What was revenue for :region last quarter?" User A asks about the West region, and Genie answers by running that exact query text with region set to West. User B asks about revenue by product category, and Genie borrows the query's structure to write new SQL. Which answers are marked as verified?

    Sources4

    Sources

    (4)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “When you create an agent, Genie Code launches automatically.”
      ↩︎ Creating a Genie space and what it starts with
      “Genie does not suggest queries on tables that are not added to the agent.”
      ↩︎ Creating a Genie space and what it starts with
      “Genie Agent creators automatically have CAN MANAGE permissions on agents they create.”
      ↩︎ Creating a Genie space and what it starts with
      “A Genie Agent uses only the data sources explicitly attached under its Sources.”
      ↩︎ Creating a Genie space and what it starts with
      “You can add up to 50 tables, views, or metric views to a Genie Agent.”
      ↩︎ Curating the Unity Catalog datasets
      “A Genie Agent can use a pro or serverless SQL warehouse. For optimal performance, Databricks recommends using a serverless SQL warehouse.”
      ↩︎ Choosing the SQL warehouse
      “When you create or configure a Genie Agent, you must have at least CAN USE permission on the selected warehouse.”
      ↩︎ Choosing the SQL warehouse
      “These embedded credentials grant access to the warehouse only.”
      ↩︎ Choosing the SQL warehouse
      “If a different author changes the warehouse later, their compute credentials are embedded instead.”
      ↩︎ Choosing the SQL warehouse
      “Choose a title that will help end users discover your Genie Agent.”
      ↩︎ Title, description and sample questions
      “Author-defined common questions take priority and appear first.”
      ↩︎ Title, description and sample questions
      “A Genie Agent uses only the data sources explicitly attached under its Sources.”
      ↩︎ Key concept
      “A Genie Agent can use a pro or serverless SQL warehouse. For optimal performance, Databricks recommends using a serverless SQL warehouse.”
      ↩︎ Exam trap 1
      “These embedded credentials grant access to the warehouse only.”
      ↩︎ Exam trap 2
      “These embedded credentials grant access to the warehouse only. Data access is always evaluated using each end user's own Unity Catalog permissions.”
      ↩︎ Checkpoint
      “Author-defined common questions take priority and appear first. When you provide enough common questions to fill the chat landing page, only your questions appear.”
      ↩︎ Checkpoint
    2. 2.
      “Aim for five or fewer tables.”
      ↩︎ Curating the Unity Catalog datasets
      “prejoin related tables into views or metric views before adding them to your agent.”
      ↩︎ Curating the Unity Catalog datasets
      “This metadata is scoped to your Genie Agent and does not overwrite metadata stored in Unity Catalog.”
      ↩︎ Curating the Unity Catalog datasets
      “Use text instructions only as a last resort”
      ↩︎ Instructions: SQL expressions first, example SQL next, text last
      “Too many instructions can reduce effectiveness, especially in longer conversations”
      ↩︎ Instructions: SQL expressions first, example SQL next, text last
      “if text instructions specify rounding decimals to two digits, then example SQL queries must also round to two digits.”
      ↩︎ Instructions: SQL expressions first, example SQL next, text last
      “Only text instructions affect summary generation.”
      ↩︎ Instructions: SQL expressions first, example SQL next, text last
      “Aim for five or fewer tables.”
      ↩︎ Exam trap 3
      “Use text instructions only as a last resort”
      ↩︎ Exam trap 4
    3. 3.
      “including managed tables, external tables, foreign tables, views, metric views, and materialized views.”
      ↩︎ Curating the Unity Catalog datasets
      “Generated queries are always read-only.”
      ↩︎ Choosing the SQL warehouse
    4. 4.
      “use the most typical phrasing of the user's question as the title.”
      ↩︎ Title, description and sample questions
      “Each example SQL query, each SQL function, and the entire General instructions text block each count as one instruction.”
      ↩︎ Instructions: SQL expressions first, example SQL next, text last
      “In chat mode, when the exact text of a parameterized query is used in a response, Genie provides a verified answer.”
      ↩︎ Vetting queries as trusted assets
      “Supported types include String, Date, Date and Time, Decimal, and Integer. The default is String.”
      ↩︎ Vetting queries as trusted assets
      “If the input value does not match the selected type, Genie treats it as the incorrect type, which can lead to inaccurate results.”
      ↩︎ Vetting queries as trusted assets
      “Genie cannot view or modify the SQL used in the function”
      ↩︎ Vetting queries as trusted assets
      “Agent users must have EXECUTE permission on any SQL functions used as trusted assets.”
      ↩︎ Vetting queries as trusted assets
      “Users with at least CAN EDIT permission on a Genie Agent can add or remove trusted assets.”
      ↩︎ Vetting queries as trusted assets
      “In chat mode, when the exact text of a parameterized query is used in a response, Genie provides a verified answer.”
      ↩︎ Exam trap 5
      “Trusted assets are example SQL queries and SQL functions that provide verified answers to questions you anticipate from users.”
      ↩︎ Prediction

    Spotted a mistake, or was something unclear? Tell us.