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:
- Click Genie Agents in the sidebar.
- Click New in the upper-right corner.
- 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?
The search for suggested queries covers only attached assets. Queries that ran against an unattached source table are not returned, even if the attached view is built from that table. Mentioning the table in instructions does not change what is attached.
“Genie does not suggest queries on tables that are not added to the agent.”Source: docs.databricks.com
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?
Synonyms, custom descriptions and hidden columns belong to the Genie space only. They do not overwrite the metadata in Unity Catalog, so you can tune one space without changing a table other teams depend on.
“This metadata is scoped to your Genie Agent and does not overwrite metadata stored in Unity Catalog.”Source: docs.databricks.com
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?
Correct answer: A — A Genie space supports at most 50 tables, views, and metric views combined, so the team should curate a focused subset instead of the entire schema
- A. This is correct because a Genie space is limited to 50 tables, views, and metric views combined, and Databricks guidance favors a small, well-documented curated set over dumping in an entire schema.
- B. This is incorrect because a Genie space does not support unlimited datasets; there is a documented 50-object cap that the finance team would exceed with 68 tables and views.
- C. This is incorrect because the actual limit is 50 combined objects, not 10, so splitting into several spaces for a 68-object schema is unnecessarily aggressive.
- D. This is incorrect because the 50-object limit counts tables, views, and metric views together, so mixing in views does not let the team exceed the cap with all 68 objects.
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.
| Aspect | Rule |
|---|---|
| Valid warehouse types | Pro or serverless; serverless is recommended for performance |
| Permission to select it | At least CAN USE on the warehouse |
| Permission to change it later | At least CAN EDIT on the Genie space |
| What the embedded credentials grant | Access to the warehouse only, not to data |
| Who decides data access | Each 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.
The warehouse setting separates compute from data. The author's embedded credentials only let users' queries run on a pro or serverless warehouse. Unity Catalog still checks each user's own permissions on the data. CAN USE is the minimum to select a warehouse, and CAN EDIT on the space is needed to change it.
“These embedded credentials grant access to the warehouse only. Data access is always evaluated using each end user's own Unity Catalog permissions.”Source: docs.databricks.com
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?
Correct answer: A — A Pro or serverless SQL warehouse, since Genie spaces only support those two types, and Databricks recommends serverless for the best query performance
- A. This is correct because Genie spaces can only be attached to a Pro or a serverless SQL warehouse, and Databricks recommends serverless specifically because it delivers the best query performance for the space.
- B. This is incorrect because Classic warehouses are not one of the supported warehouse types for a Genie space regardless of whether autoscaling is turned on; the restriction is on warehouse type, not on scaling configuration.
- C. This is incorrect because a Genie space still relies on an attached workspace SQL warehouse to execute the SQL it generates; there is no separate internal compute engine that bypasses warehouse selection.
- D. This is incorrect because Pro warehouses are also a supported option for a Genie space; serverless is merely the recommended choice for performance, not the only permitted one.
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?
Correct answer: A — CAN USE permission on the SQL warehouse, which is the minimum access level required before it can be attached to a Genie space
- A. This is correct because CAN USE is documented as the minimum permission level a user needs on a SQL warehouse before that warehouse becomes available to attach to a Genie space.
- B. This is incorrect because Genie spaces do not require administrative control of the warehouse; the far lower CAN USE level is sufficient for attaching it.
- C. This is incorrect because attaching a warehouse to a Genie space only requires the ability to submit queries against it, not a separate restart-level permission.
- D. This is incorrect because read-only visibility does not let the warehouse actually execute queries submitted by the space; CAN USE, not CAN VIEW, is the required level.
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?
Author-defined common questions take priority and appear first. If there are too few to fill the landing page, Genie fills the remaining slots with questions it generates. Only a full set of author questions keeps generated ones off the page.
“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.”Source: docs.databricks.com
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.
| Type | Use it for | Example |
|---|---|---|
| SQL expression | Frequently used metrics, filters or dimensions | revenue, active_customers, gross_margin, recent_sales |
| Example SQL query | Hard-to-interpret, multi-part or complex questions | "breakdown my team's performance" |
| Text instruction | Global 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.
-- 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;An opportunity counts as pipeline only when both conditions hold: it is tagged 'Pipeline' and its stage is not closed. AND requires both. OR would also count closed opportunities that are tagged as pipeline, and any untagged opportunity that is still open. Encoding this rule in an example query keeps Genie from having to guess it.
Source: docs.databricks.com6.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.
| Trusted asset | When the answer is verified | Permission users need |
|---|---|---|
| Parameterized example SQL query | When the exact query text is used in chat mode; users can edit the parameter and rerun | Their own Unity Catalog access to the data |
| SQL function in Unity Catalog | When Genie calls the function; Genie cannot view or modify its SQL | EXECUTE 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?
A parameterized example query gives a verified answer only when Genie uses its exact text in chat mode. If Genie only borrows ideas from the query to write new SQL, the answer isn't verified, even though the query is a trusted asset.
“In chat mode, when the exact text of a parameterized query is used in a response, Genie provides a verified answer.”Source: docs.databricks.com
Sources4
Sources
(4)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 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.
“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.
“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.
“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