What you will be able to do
- Tell static example queries, parameterized example queries and Unity Catalog SQL functions apart, and pick the right one for a given question.
- Explain which assets count as trusted assets and what users need in order to use them.
- Keep track of a Genie space's separate limits on data objects, instructions and knowledge store snippets.
1.Example queries: static and parameterized
Data objects decide what a Genie space can see. The second part of curation decides how it answers. Here the curator attaches logic assets instead of data. The first is the example SQL query: a question phrased the way a user would ask it, paired with SQL that answers it. Queries can be static or parameterized. When a user asks the same question, Genie can run the example directly. When the question is only similar, Genie learns from the example's structure. Databricks advises using examples to capture logic specific to your organization, such as how this CRM decides that an opportunity counts as pipeline.
-- 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 parameterized example adds a placeholder, written as :parameter_name. Genie fills it from the user's question at runtime, so one verified query structure can serve many variants, such as "open pipeline for EMEA" and "open pipeline for APAC". Each parameter has a data type: String (the default), Date, Date and Time, Decimal or Integer. It also has an optional comment describing valid values, which helps Genie pick the right input. Choose the type carefully. If the input doesn't match the selected type, Genie treats it as the wrong type and the results can be inaccurate.
Checkpoint 1 of 5· Check yourself
Which of these is NOT a supported data type for a parameter in a Genie example query?
The documented types are String, Date, Date and Time, Decimal and Integer. Boolean is not on the list.
“Supported types include String, Date, Date and Time, Decimal, and Integer.”Source: docs.databricks.com
Sources1
2.SQL functions: logic a query cannot hold
Some questions involve logic too complex for a static or parameterized query. For those, register a SQL function in Unity Catalog and attach it to the space. Genie calls it with parameters taken from the user's question. Genie supports scalar functions, which return a single value, and table-valued functions, which return a table of rows. Because Genie can't see the function body, functions are the right choice when the logic is sensitive or must not drift. Since they live in Unity Catalog, other teams can reuse them too. Like tables, a function is only available if it is attached.
Checkpoint 2 of 5· Fill the gap
This registers a Unity Catalog SQL function that a Genie space could use. Which keyword completes the language clause?
CREATE OR REPLACE FUNCTION my_catalog.my_schema.calculate_bmi(weight DOUBLE, height DOUBLE)
RETURNS DOUBLE
LANGUAGE ?
RETURN
SELECT weight / (height * height);The body is a RETURN SELECT expression, so this is a SQL UDF. The Python form instead uses LANGUAGE PYTHON with a body between $$ markers.
Source: docs.databricks.comSources1
3.Trusted assets and the permissions behind them
Parameterized example queries and SQL functions together make up trusted assets: logic an author has verified. When Genie answers with a trusted asset, the user sees a verified answer. For a parameterized query, that label appears in chat mode only when the exact text of the query produced the response. Users can then change the parameter value and run it again. Static example queries help Genie produce correct SQL, but they are not on the trusted-asset list.
The permissions follow from Unity Catalog. Anyone with at least CAN EDIT on the space can add or remove trusted assets. The users who ask questions need EXECUTE on every SQL function used as a trusted asset. The UDF documentation also requires USAGE on the function's schema and catalog.
Checkpoint 3 of 5· Check yourself
Business users get errors whenever Genie answers with an attached SQL function, but questions answered from tables work. What is the most likely gap?
Data access already works, so the warehouse and tables are fine. Users also need EXECUTE on every function used as a trusted asset.
“Agent users must have EXECUTE permission on any SQL functions used as trusted assets.”Source: docs.databricks.com
Checkpoint 4 of 5· 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.Choosing the asset, and the limits that apply
Which asset you pick depends on the shape of the question. For complex, multi-part or ambiguous questions, use complete example queries. When the same question comes back with different values, parameterize it so the answer is verified. When the logic can't be expressed as a query, or must stay hidden, use a SQL function. Text instructions are a last resort. Guidance that applies only to some prompts belongs in an example query or a function, not in the general text.
These assets count against a different limit from data objects. The 50-object cap covers tables, views and metric views only. Example queries and functions count against a separate limit of 100 instructions.
| Limit | Ceiling | What counts |
|---|---|---|
| Data objects | 50 | Tables, views or metric views |
| Instructions | 100 | Each example SQL query, each SQL function, and the whole General instructions block (one each) |
| Knowledge store snippets | 200 | Table descriptions, join relationships and SQL expressions (measures, filters, dimensions) |
Checkpoint 5 of 5· Match them up
Match each need to the curation asset that fits it best
Tap a term, then the definition that fits it.
Parameterized queries reuse verified structure with new inputs. Functions hide complex logic. Full examples teach multi-step patterns. Text instructions hold only global context.
“If an instruction is relevant only to a subset of prompts, it should be included as an example query or function”Source: docs.databricks.com
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.Attached SQL functions and example queries use up slots in the 50-object data limit.Why is that wrong?
The 50-object limit covers tables, views and metric views. Example queries, functions and the General instructions block each count as one instruction toward a separate limit of 100.
2.Every example SQL query is a trusted asset that produces a verified answer.Why is that wrong?
Trusted assets are parameterized example queries and SQL functions. A parameterized query produces a verified answer in chat mode only when its exact text was used.
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Queries can be static or parameterized.”
↩︎ Example queries: static and parameterized“With parameters, Genie can take specific inputs from user questions and reuse the structure of an example query to provide verified answers.”
↩︎ Example queries: static and parameterized“If the input value does not match the selected type, Genie treats it as the incorrect type, which can lead to inaccurate results.”
↩︎ Example queries: static and parameterized“SQL functions are useful when a question involves complex logic that cannot be captured with a static or parameterized query.”
↩︎ SQL functions: logic a query cannot hold“Genie supports both scalar functions, which return a single value, and table-valued functions, which return a table of rows.”
↩︎ SQL functions: logic a query cannot hold“Functions can be shared across your teams and used by Genie to answer specific questions.”
↩︎ SQL functions: logic a query cannot hold“In chat mode, when the exact text of a parameterized query is used in a response, Genie provides a verified answer.”
↩︎ Trusted assets and the permissions behind them“Agent users must have EXECUTE permission on any SQL functions used as trusted assets.”
↩︎ Trusted assets and the permissions behind them“Each example SQL query, each SQL function, and the entire General instructions text block each count as one instruction.”
↩︎ Exam trap 1“Supported types include String, Date, Date and Time, Decimal, and Integer.”
↩︎ Checkpoint“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.”
↩︎ Prediction“If an instruction is relevant only to a subset of prompts, it should be included as an example query or function”
↩︎ Checkpoint - 2.https://docs.databricks.com/aws/en/udf/unity-catalogOfficial docs
“To run a UDF, users need EXECUTE permission on the UDF.”
↩︎ Trusted assets and the permissions behind them - 3.
“Use example SQL queries for complex questions”
↩︎ Choosing the asset, and the limits that apply“Use text instructions only as a last resort”
↩︎ Choosing the asset, and the limits that apply - 4.
“You can add up to 50 tables, views, or metric views to a Genie Agent.”
↩︎ Choosing the asset, and the limits that apply
Also cited
“Parameterized example queries and SQL functions whose exact logic has been verified by an agent author.”
↩︎ Exam trap 2