Study guide
10.3 Trusted Assets & Parameterized Functions
Databricks Certified Data Analyst Associate Exam
Track your progress as you read
Finished sections get a check mark.
1 Platform Overview & Unity Catalog Foundations
1.1 Databricks Architecture & Compute Concepts 1.2 Databricks Marketplace & Data Sharing Basics 1.3 Unity Catalog Namespace & Object Hierarchy 1.4 Governed Asset Discovery & System Tables
2 Managing & Cleaning Governed Data
2.1 Dataset Discovery & Asset Tagging 2.2 Lineage Inspection & Data Traceability 2.3 SQL Data Cleaning & Transformation Techniques
3 Data Ingestion & Import Patterns
3.1 Workspace Uploads & Cloud File Ingestion 3.2 Incremental File Ingestion with Auto Loader 3.3 Ingesting Data via Delta Sharing & External Connections
4 Databricks SQL Warehouses & Core Querying
4.1 Databricks SQL Interface & SQL Assistant 4.2 SQL Warehouses Sizing & Management 4.3 Table Creation & Data Modification in Databricks SQL
5 Advanced SQL Authoring & Time Travel
5.1 Advanced Aggregations, Window Functions & Analytics 5.2 Complex Joins, CTEs & Set Operations 5.3 Views, Materialized Views & Delta Time Travel
6 Query Performance Analysis & Photon Engine
6.1 Photon Engine Architecture & Acceleration 6.2 Query History & Execution Profile Inspection 6.3 Delta Lake Audit History & Commit Logs
7 Liquid Clustering, Caching & Performance Troubleshooting
7.1 Caching Hierarchy in Databricks SQL 7.2 Data Layout Optimization: Liquid Clustering vs Partitioning & Z-Ordering 7.3 Troubleshooting Slow & Failing Queries
8 AI/BI Dashboards & Visualization Design
8.1 AI/BI Dashboards Overview & Canvas Layout 8.2 Chart Types & Visualization Selection 8.3 Notebook & SQL Editor Visualizations
9 Dashboard Interactivity, Publishing & Alerts
9.1 Dashboard Parameters & Interactive Filtering 9.2 Publishing, Sharing & Access Control 9.3 Scheduled Refresh, Email Subscriptions & Alerts
10 Developing & Maintaining AI/BI Genie Spaces
10.1 AI/BI Genie Architecture & Space Setup 10.2 Curation via Instructions, Descriptions & Sample Questions 10.3 Trusted Assets & Parameterized Functions 10.4 Monitoring, Benchmarks, Feedback & Maintenance
11 Data Modeling & Medallion Architecture
11.1 Dimensional Modeling Fundamentals 11.2 Medallion Architecture for Analytics 11.3 Constraint Enforcement & Relationships in Unity Catalog
12 Securing Data & Unity Catalog Governance
12.1 Unity Catalog Privilege Model & Grants 12.2 Ownership, Inheritance & Access Control Patterns 12.3 Fine-Grained Security: Row Filters & Column Masks
10.3 Trusted Assets & Parameterized Functions
Key Takeaways Explain This Topic AI
Trusted Assets in AI/BI Genie are pre-verified SQL queries and Unity Catalog User-Defined Functions (UDFs) that guarantee 100% deterministic accuracy for critical KPIs.
Parameterized SQL UDFs allow Genie to extract natural language arguments (such as dates, product categories, or thresholds) and pass them into validated code.
When Genie matches a user prompt to a Trusted Asset, it executes the pre-authored UDF instead of dynamically generating SQL, eliminating LLM hallucinated logic.
Unity Catalog SQL UDFs used as Trusted Assets must specify input parameter data types and return structured tabular or scalar results.
Last updated: July 2026
10.3 Trusted Assets & Parameterized Functions
In enterprise analytics, certain calculations—such as official financial earnings, regulatory compliance metrics, or complex customer churn algorithms—cannot tolerate LLM generation variance. While dynamic SQL translation handles ad-hoc exploration effectively, business-critical KPIs demand deterministic execution. Databricks AI/BI Genie addresses this requirement through Trusted Assets : pre-verified, published SQL assets and parameterized Unity Catalog User-Defined Functions (UDFs) that Genie executes directly whenever relevant natural language prompts are detected.
Understanding Trusted Assets in AI/BI Genie
A Trusted Asset is a curated, analyst-approved data object linked to a Genie space. When an end user asks a question that matches the semantic scope of a Trusted Asset, Genie bypasses dynamic SQL generation and executes the trusted code path instead. +-----------------------------------+
- | User Natural Language |
- | "Calculate ARR for Q1 2026" |
- +-----------------------------------+
- |
- v
- /-----------------------------\
- / Genie Intent Engine \
- \ Matches Trusted Asset Scope? /
- \-------------------------------/
- / \
- YES / \ NO
- v v
- +------------------------+ +------------------------+
- | Execute Verified UDF | | Dynamic SQL Generation |
- | - 100% Deterministic | | - LLM Constructs SQL |
- | - Zero Hallucinations | | - Validated on DBSQL |
- +------------------------+ +------------------------+
- Key Advantages of Trusted Assets
Deterministic Precision : Guarantees identical, verified SQL logic every time a specific metric is requested.
Governance & Compliance : Ensures executive dashboards and financial reports align strictly with audited corporate definitions.
Complex Logic Encapsulation : Enables execution of sophisticated queries involving window functions, recursive CTEs, or procedural logic that LLMs might struggle to construct dynamically.
Authoring Parameterized Unity Catalog SQL UDFs
The primary vehicle for creating flexible Trusted Assets is the Parameterized SQL Table Function (UDTF) or Scalar Function registered in Unity Catalog. SQL UDFs accept input parameters (such as date ranges, region codes, or customer identifiers) and return filtered tables or scalar metrics. -- Creating a parameterized Unity Catalog SQL UDTF for accurate customer LTV calculation
- CREATE OR REPLACE FUNCTION main.finance_gold.get_customer_ltv_by_segment(
- start_date DATE,
- end_date DATE,
- target_segment STRING
- )
- RETURNS TABLE (
- customer_id INT,
- customer_name STRING,
- segment STRING,
- total_orders INT,
- lifetime_value NUMERIC(18, 2)
- )
COMMENT 'Trusted Asset: Calculates lifetime value (LTV) and total orders for customers in a specific segment between start_date and end_date.'
- RETURN
- SELECT
- c.customer_id,
- c.customer_name,
- c.customer_segment AS segment,
- COUNT(DISTINCT o.order_id) AS total_orders,
- SUM(o.net_amount) AS lifetime_value
- FROM main.sales_gold.dim_customers c
- JOIN main.sales_gold.fact_orders o ON c.customer_id = o.customer_id
- WHERE o.order_date BETWEEN start_date AND end_date
- AND c.customer_segment = target_segment
- AND o.order_status = 'COMPLETED'
- GROUP BY c.customer_id, c.customer_name, c.customer_segment;
When authoring functions for Genie:
Define explicit data types for all input parameters ( DATE , TIMESTAMP , STRING , INT ).
Provide comprehensive function comments explaining what the function calculates and what inputs it expects.
Ensure return table schema column names are clear and business-friendly.
Registering & Binding Trusted Assets to Genie Spaces
Once a SQL function is created in Unity Catalog, an analyst must explicitly bind it to the target Genie Space:
Open the Genie Space Settings and navigate to the Trusted Assets tab.
Click Add Trusted Asset and select Unity Catalog Function .
Browse the catalog hierarchy ( catalog.schema.function_name ) and select the target UDF.
Define sample natural language triggers that should route to this function (e.g., "What is the LTV for Enterprise customers in 2025?" ).
Verify parameter mapping rules and publish the updated space. -- Granting EXECUTE permission on the SQL function to space users
- GRANT EXECUTE ON FUNCTION main.finance_gold.get_customer_ltv_by_segment TO ROLE analytics_users;
- Parameter Extraction & Execution Mechanics
When a user submits a natural language question matching a Trusted Asset, Genie's intent parser performs argument extraction :
Entity Recognition : Identifies entities in the prompt matching parameter types (e.g., parsing "between January 2025 and December 2025" as start_date = '2025-01-01' and end_date = '2025-12-31' ).
Value Binding : Maps extracted values to the corresponding UDF input arguments.
Execution Call : Invokes the UDF on the Databricks SQL Warehouse: -- Generated query executing the Trusted Asset with bound parameters
- SELECT * FROM main.finance_gold.get_customer_ltv_by_segment(
- CAST('2025-01-01' AS DATE),
- CAST('2025-12-31' AS DATE),
- 'Enterprise'
- );
If an optional parameter cannot be extracted from the user's prompt, Genie will either request clarification from the user or apply default values defined within the UDF signature.
Trusted Assets vs. Dynamic SQL Generation
Analysts must balance Trusted Assets and dynamic SQL generation when building enterprise Genie spaces:
- Feature Dimension Trusted Assets (SQL UDFs) Dynamic SQL Generation
- Execution Mode Pre-written, static SQL function execution Dynamically synthesized ANSI SQL query
- Accuracy Guarantee 100% deterministic (0% hallucination risk) High, subject to schema clarity & instructions
- Flexibility Restricted to predefined parameters & outputs Highly flexible ad-hoc slice-and-dice queries
Best Use Case Executive KPIs, audited finance, regulatory reports Exploratory analysis, unexpected ad-hoc questions
Maintenance Need Requires UDF updates if business logic shifts Maintained via Space Instructions & Descriptions