What you will be able to do
- Decide which tables, views and metric views to attach to a Genie space for one business domain, and when to prejoin raw tables first
- Explain why a metric view, rather than a text instruction or extra example queries, gives one consistent definition of a business metric
- Choose between a static example query, a parameterized example query and a Unity Catalog SQL function as a trusted asset
- Apply the object, instruction and knowledge store limits when deciding what fits into one space
Key concept
Attached sources as Genie's whole world — A Genie space can only query the Unity Catalog tables, views, metric views and functions its author attaches to it. Curation means choosing that small set for one domain, shaping it so Genie can answer correctly, and leaving out everything else.
1.What Genie can reach: only what you attach
A Genie space is a natural-language chat interface over a curated set of Unity Catalog data, and the curated set is the only data it can query. Databricks has renamed Genie spaces to Genie Agents, but the curation model is the same. A data analyst attaches objects under Configure > Data and supplies example queries, functions and instructions. Business users then ask questions in chat, and Genie writes read-only SQL against what was attached.
The boundary is strict. If an instruction says "join to the returns table" and the returns table is not attached, Genie will not query it. A function your instructions mention is ignored too if it was never added. When an answer is missing a dimension the business obviously has, check first whether the object holding it is attached at all.
Every attachable object must be registered in Unity Catalog. That covers managed tables, external tables, foreign tables, views, metric views and materialized views. Managed tables are the Databricks default and the recommended type for most use cases, but Genie can read any of these. What decides whether a table belongs in the space is the domain the space serves, not the storage type.
Attaching an object makes it reachable. It does not give anyone permission to read it. The author's compute credentials are embedded in the space for the SQL warehouse, but every query still runs against each user's own grants, as covered in UC privileges as the agent's retrieval boundary. So curation and permissions are separate checks. A space shared with store managers needs those managers to hold SELECT on every attached table and view, and EXECUTE on every attached function. Otherwise the curated assets exist but return nothing to the people the space was built for.
Checkpoint 1 of 9· Check yourself
A Genie space for store managers has this general instruction: "For return questions, join sales to the returns table." Managers say answers never break results down by return reason, even though the returns table has that column. The returns table is not listed under Configure > Data. What should the author do?
Genie queries only the sources attached to the space. Instructions, metadata or user grants that refer to an unattached table do not make it reachable, so the table has to be attached first.
“Genie does not query tables or Unity Catalog functions that are not attached, even if the agent's instructions or metadata reference them.”Source: docs.databricks.com
2.Choosing a small, focused set and prejoining it
A good space serves one topic and one audience, and its data selection should be as small as that purpose allows. Databricks suggests aiming for five or fewer tables and limiting columns as well. A space for store managers asking about weekly sales does not need HR, marketing-attribution and supply-chain tables just because they share a catalog. Each extra table is one more candidate Genie can pick wrongly when a question is ambiguous.
Raw normalized schemas are the usual obstacle. Take a raw orders fact table plus separate product, customer and store dimensions, where nearly every useful question needs all four. Attaching all four leaves Genie to rebuild the join path for every question, and it can get that wrong. A better approach is to build one denormalized view that already joins orders to the product, customer and store attributes. Attach that view and drop the columns nobody asks about. The join logic is then written once, by someone who knows the data, and Genie only has to filter and aggregate.
| Approach | What Genie must get right on every question | Verdict |
|---|---|---|
| Attach raw orders, product, customer and store tables | The join keys and join path between all four tables | Works, but Genie rebuilds the joins every time, which is the riskiest thing to leave to free-form SQL generation |
| Attach only orders and write a text instruction to always join the other three | Following prose guidance to reach tables that are not attached | Fails: Genie does not query objects that are not attached, and text instructions are a last resort |
| Attach unchanged copies of the four raw tables | The same join path as the raw tables | No simplification: copying the data does not remove the join problem |
| Attach a prejoined, denormalized view of orders with product, customer and store attributes | Filters and aggregations on one wide object | Recommended: the view resolves the joins before Genie sees the data |
A SQL function is the wrong tool for joining the data behind every question. Functions are for specific questions that a static or parameterized query cannot answer. They do not replace a well-shaped dataset. Within the view you attach, you can also hide columns that are confusing or unimportant. A view with forty columns, six of which are different date fields, invites Genie to filter on the wrong one.
Genie's suggested example queries are one side effect to plan for. When you attach assets, Genie looks for popular workspace queries that ran against those exact assets. If you built a prejoined view just for the space, the analysts' existing queries probably still run against the raw source tables, so Genie will not suggest them. Expect to write the space's example queries against the new view yourself.
Checkpoint 2 of 9· Match them up
Store managers' weekly-sales questions need orders joined to the product, customer and store dimensions. Match each way of exposing that data to Genie with its outcome.
Tap a term, then the definition that fits it.
Databricks recommends simplifying the data before Genie sees it by prejoining it into a view. Raw tables leave the joins to Genie, an instruction cannot reach tables that are not attached, and functions handle specific questions rather than reshaping the dataset.
“Resolve column ambiguities and pre-join or de-normalize tables using views or metric views.”Source: docs.databricks.com
Checkpoint 3 of 9· Exam question
A retail analytics team is curating a Genie space so store managers can ask sales questions in natural language. The underlying data lives in a raw orders table plus separate product, customer, and store dimension tables that must be joined for every meaningful question. What should the curators do before adding assets to the Genie space?
Correct answer: B — Build a pre-joined, denormalized view combining orders with the product, customer, and store attributes, then curate it
- A. Incorrect: leaving four raw tables un-joined forces Genie to infer join logic on every question, increasing ambiguity and the chance of incorrect or missed joins.
- B. Correct: pre-joining and denormalizing removes ambiguity about which keys and columns to combine, so Genie can answer directly from one curated, business-ready asset.
- C. Incorrect: instructions are meant as a last resort for guidance, not a substitute for encoding join logic in the data itself, and this approach still leaves join ambiguity unresolved.
- D. Incorrect: a straight, unchanged copy of each raw table does nothing to resolve the underlying join complexity that store managers' questions require.
- E. Incorrect: SQL functions are best reserved for reusable calculation logic, not as a mechanism to perform structural joins across four separate raw tables on every query.
3.Metric views for one definition of a metric
When the problem is inconsistent numbers rather than difficult joins, the fix is a metric view. Suppose monthly recurring revenue comes out differently depending on which of three team views Genie picks, because each team aggregates MRR its own way. Genie is not at fault: the attached data holds three definitions of MRR, so a question can get any of three answers. A metric view encodes the metric, its dimensions and its aggregation once. Genie inherits that definition, so every MRR query uses the same approved logic.
Text instructions are the least reliable way to define a metric. Databricks ranks them below SQL expressions and example SQL, to be used only when those cannot do the job. A prose formula still leaves three conflicting views attached and relies on Genie to follow the prose and skip the views every time. Defining the metric in SQL, in one metric view, removes the conflict at the source.
Two other tempting fixes also miss the cause. Adding several example queries that each calculate MRR differently feeds Genie conflicting guidance, which is exactly what curators are told to eliminate, because Genie is nondeterministic and conflicts turn into inconsistent answers. Renaming columns and adding synonyms helps Genie find the right column, but it does not change how the number is calculated, so the disagreement remains. Metric views also help with the object limit. When a domain needs many tables, prejoining them into metric views reduces the count and puts the business logic in one place.
Checkpoint 4 of 9· Check yourself
Finance users report that "active customers" gives different counts depending on the question. The space has two team views attached, and each team counts active customers its own way. Every question needs only one table, so there are no joins. Which change fixes the cause?
The symptom is one metric with more than one definition, not difficult joins. A metric view defines the metric once in SQL, and Genie inherits that definition. A prose instruction is a last resort that leaves the conflicting views attached, and synonyms or prejoining don't change how the number is calculated.
“Genie inherits these definitions automatically, which guarantees that every query relies on the same approved logic.”Source: www.databricks.com
Checkpoint 5 of 9· Exam question
A finance team's Genie space produces inconsistent monthly recurring revenue (MRR) figures because analysts across teams calculate the aggregation differently in each underlying view. Which curation approach best resolves this discrepancy going forward?
Correct answer: A — Author a metric view that encodes the MRR definition once, and curate that metric view into the Genie space
- A. Correct: metric views centralize a business metric's definition in one governed asset, so every question against it uses the same approved calculation instead of ad hoc logic.
- B. Incorrect: prose instructions are a weaker, last-resort mechanism and do not enforce a single computed definition the way a metric view does.
- C. Incorrect: per-region raw tables summed on the fly still leave the aggregation logic undefined and open to inconsistent interpretation.
- D. Incorrect: presenting multiple conflicting example queries reintroduces the same inconsistency the team is trying to eliminate.
- E. Incorrect: renaming columns and adding synonyms improves discoverability but does not fix the underlying calculation inconsistency.
4.Trusted assets: parameterized queries and SQL functions
Tables and views tell Genie what the data is. Trusted assets show it how to answer particular questions with logic an author has checked. There are two kinds: parameterized example SQL queries and SQL functions registered in Unity Catalog. When Genie answers with one of them, the response runs on the verified logic and is marked as a verified answer. Users see that the answer came from approved SQL rather than freshly generated SQL.
Use an example query when business logic is easy to get wrong. The example below encodes two rules that Genie's general knowledge could not guess. An opportunity counts as pipeline only when its forecast category says so, and closed stages are excluded. Title the query with the question as a user would usually phrase it, so Genie can match incoming prompts to it.
-- 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;A static query like this answers one fixed question. Adding a parameter, typed as :parameter_name in the editor, turns it into a template. Genie takes the value from the user's question, inserts it at runtime and reuses the verified structure. Each parameter has a data type (String, Date, Date and Time, Decimal or Integer) and a comment describing valid values. Set the type carefully. If the input does not match the selected type, Genie treats it as the wrong type, which can produce inaccurate results. In chat mode, the verified label appears only when Genie uses the exact text of the parameterized query. Users can then change the parameter value and run it again.
SQL functions are for logic that a static or parameterized query cannot express, or that must run exactly as written. A standardized tax calculation is a typical case. Genie can call scalar functions, which return one value, and table-valued functions, which return rows, passing in parameters taken from the user's question. Genie cannot see or change the SQL inside the function, so this is the right choice for logic that should not be exposed or altered. Functions are also shared Unity Catalog objects, so several teams' spaces can reuse the same definition.
| Asset | Use it when | Marked as verified? |
|---|---|---|
| Static example SQL query | A common or complex question has one fixed form and the logic is specific to your organization | No. Genie can use it directly or learn from it for similar questions |
| Parameterized example SQL query | The same verified structure should answer the question for different values, such as a region or a date | Yes, in chat mode, when Genie uses the exact query text |
| Unity Catalog SQL function (scalar or table-valued) | The logic cannot be written as a static or parameterized query, or must be reused exactly and kept hidden from Genie | Yes. Users also need EXECUTE on the function |
Only users with at least CAN EDIT on the space can add or remove trusted assets. Adding a function to the space also has the permission consequence from the first section: users of the space need EXECUTE on that function, granted in Unity Catalog. Attaching the function to the space does not grant it.
Checkpoint 6 of 9· Fill the gap
This example query encodes the organization's rule for what counts as open pipeline. Which value completes the filter?
-- 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 = ? AND
o.stagename NOT ILIKE '%closed%'
GROUP BY ALL;An opportunity counts as pipeline only when its forecast category is tagged 'Pipeline', and closed stages are excluded by the separate stagename filter. Genie could not guess this organization-specific rule, which is why it belongs in an example query.
Source: docs.databricks.comCheckpoint 7 of 9· Check yourself
Which trusted asset should a curator add for a standardized commission calculation that several teams' spaces must reuse exactly, and whose formula Genie should not be able to see or alter?
Genie cannot see or change the SQL inside a function, and functions are shared Unity Catalog objects that several spaces can reuse. Example queries expose their SQL for Genie to use or learn from, and text instructions are a last resort. Users still need EXECUTE on the function.
“Genie cannot view or modify the SQL used in the function, making this approach well-suited for logic that should not be surfaced or changed.”Source: docs.databricks.com
5.Genie space limits that shape what you curate
A Genie space has three separate limits, and each one covers different curated items. Knowing which limit an item counts against tells you what an addition will cost. One shared cap covers every data object you attach, whether table, view or metric view. A second limit covers trusted assets and instructions. A third covers knowledge store snippets.
The knowledge store is the space's own layer of curated semantic definitions: table descriptions, join relationships and SQL expressions for measures, filters and dimensions, plus synonyms and prompt matching settings. It exists to sharpen Genie's understanding of the attached data and improve response accuracy. It is scoped to the one space, so editing it never changes Unity Catalog metadata. That shared purpose is why descriptions, joins and SQL expressions are counted together under one snippet limit.
| Limit | Per space | Counts toward it | Does not count toward it |
|---|---|---|---|
| Data objects | 50 | Tables, views and metric views, all from one shared pool | Example SQL queries, SQL functions, instructions |
| Instructions | 100 | Each example SQL query, each SQL function, and the whole General instructions text block as one | Tables, views, metric views |
| Knowledge store snippets | 200 | Table descriptions, join relationships, SQL expressions (measures, filters, dimensions) | Text instructions, example SQL queries, SQL functions, column descriptions, prompt matching settings |
When a proposed addition would go over the object cap, first prioritize: decide which new tables the space's questions actually need. Then consolidate by prejoining related tables into views or metric views, which counts as one object instead of several. Deleting example queries or SQL functions frees nothing here, because they count against the instruction limit, not the object cap. The instruction limit does affect query-heavy designs. A space with eighty parameterized queries and fifteen functions has room for only five more, and the General instructions block takes one of those five.
Checkpoint 8 of 9· Match them up
A curator is deciding what to add to a Genie space and wants to know which limit each item uses up. Match each item to how it counts.
Tap a term, then the definition that fits it.
Tables, views and metric views share the 50-object cap. Example queries, functions and the whole General instructions block each count as one instruction toward the limit of 100. Table descriptions, join relationships and SQL expressions count toward the separate limit of 200 knowledge store snippets.
“Each example SQL query, each SQL function, and the entire General instructions text block each count as one instruction.”Source: docs.databricks.com
Checkpoint 9 of 9· Exam question
A curator has already added 28 tables and views to a marketing Genie space and now wants to add three more raw tables plus two new parameterized example queries to support upcoming use cases. Given Databricks' curation limits for Genie spaces, what should the curator do?
Correct answer: A — Recognize tables and views share a combined 30-object cap; adding all three tables would exceed it, so prioritize first
- A. Correct: Genie spaces support up to 30 tables or views total, so 28 existing plus 3 new tables would exceed the cap; the curator must prioritize which tables matter most or consolidate them first.
- B. Incorrect: it is tables and views, not SQL functions, that are subject to the 30-object limit, so this reasoning is backwards.
- C. Incorrect: the 30 table/view limit is a real, documented constraint, not an unlimited allowance.
- D. Incorrect: parameterized example queries are not counted against the 30 table/view limit, so removing them would not free up capacity for new tables.
- E. Incorrect: SQL functions are not counted against the same 30-item table/view limit, so removing them would not resolve the table overage.
Sources
(6)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Genie does not query tables or Unity Catalog functions that are not attached, even if the agent's instructions or metadata reference them.”
↩︎ What Genie can reach: only what you attach“Genie Agents were formerly known as Genie Spaces.”
↩︎ What Genie can reach: only what you attach“Data access is always evaluated using each end user's own Unity Catalog permissions.”
↩︎ What Genie can reach: only what you attach“Genie does not suggest queries on tables that are not added to the agent.”
↩︎ Choosing a small, focused set and prejoining it“You can add up to 50 tables, views, or metric views to a Genie Agent.”
↩︎ Genie space limits that shape what you curate“Genie does not query tables or Unity Catalog functions that are not attached, even if the agent's instructions or metadata reference them.”
↩︎ Key concept“Access to the attached sources is still governed by each user's Unity Catalog permissions.”
↩︎ Exam trap 1“Genie does not query tables or Unity Catalog functions that are not attached, even if the agent's instructions or metadata reference them.”
↩︎ Exam trap 2 - 2.
“including managed tables, external tables, foreign tables, views, metric views, and materialized views”
↩︎ What Genie can reach: only what you attach“Parameterized example queries and SQL functions whose exact logic has been verified by an agent author.”
↩︎ Trusted assets: parameterized queries and SQL functions - 3.
“For most use cases, Databricks recommends using managed tables.”
↩︎ What Genie can reach: only what you attach - 4.
“Aim for five or fewer tables.”
↩︎ Choosing a small, focused set and prejoining it“An agent should answer questions for a particular topic and audience, not general questions across various domains.”
↩︎ Choosing a small, focused set and prejoining it“pre-join or de-normalize tables using views or metric views”
↩︎ Choosing a small, focused set and prejoining it“Hide any columns that might be confusing or unimportant.”
↩︎ Choosing a small, focused set and prejoining it“Metric views are particularly effective for Genie Agents because they pre-define metrics, dimensions, and aggregations.”
↩︎ Metric views for one definition of a metric“Use text instructions only as a last resort when SQL expressions and examples cannot address the need.”
↩︎ Metric views for one definition of a metric“If your data topic requires more than 50 tables, prejoin related tables into views or metric views before adding them to your agent.”
↩︎ Metric views for one definition of a metric“Use text instructions only as a last resort when SQL expressions and examples cannot address the need.”
↩︎ Exam trap 3“Resolve column ambiguities and pre-join or de-normalize tables using views or metric views.”
↩︎ Checkpoint - 5.https://www.databricks.com/blog/data-dialogue-best-practices-guide-building-high-performing-genie-spacesSecondary source
“Genie inherits these definitions automatically, which guarantees that every query relies on the same approved logic.”
↩︎ Metric views for one definition of a metric“Use User Defined Functions for logic that must be reused exactly as-is, with no variation in the underlying formula”
↩︎ Trusted assets: parameterized queries and SQL functions - 6.
“In chat mode, when the exact text of a parameterized query is used in a response, Genie provides a verified answer.”
↩︎ Trusted assets: parameterized queries and SQL functions“For questions that cannot be answered with a static or parameterized SQL query, you can register a custom function to Unity Catalog.”
↩︎ Trusted assets: parameterized queries and SQL functions“Genie cannot view or modify the SQL used in the function, making this approach well-suited for logic that should not be surfaced or changed.”
↩︎ Trusted assets: parameterized queries and SQL functions“Genie supports both scalar functions, which return a single value, and table-valued functions, which return a table of rows.”
↩︎ Trusted assets: parameterized queries and SQL functions“Agent users must have EXECUTE permission on any SQL functions used as trusted assets.”
↩︎ Trusted assets: parameterized queries and SQL functions“Each example SQL query, each SQL function, and the entire General instructions text block each count as one instruction.”
↩︎ Genie space limits that shape what you curate“Text instructions, example SQL queries, SQL functions, column descriptions, and prompt matching settings do not count toward this limit.”
↩︎ Genie space limits that shape what you curate“A knowledge store is a collection of curated semantic definitions that enhances Genie's understanding of your data and improves response accuracy.”
↩︎ Genie space limits that shape what you curate“All knowledge store configurations are scoped to your Genie Agent and do not affect Unity Catalog metadata or other Databricks assets.”
↩︎ Genie space limits that shape what you curate“Each example SQL query, each SQL function, and the entire General instructions text block each count as one instruction.”
↩︎ Exam trap 4