Creating Dashboards and Visualizations in Databricks
Anatomy of an AI/BI dashboard
A dashboard is a collection of datasets (SQL queries), visualizations built from those datasets, and pages that arrange them. Adding a dataset means writing SQL against tables in Unity Catalog; the dashboard executes it on a chosen SQL warehouse.
Key building blocks:
- Parameters - declared on the dashboard, referenced inside dataset SQL with
:paramsyntax; used to drive whole datasets. - Filters - attached to a visualization or page and bound to a field, enabling cross-filtering between visuals.
- Visualization types - table, bar, line, area, scatter, pie, counter/KPI, pivot, heatmap, map, and text/markdown boxes.
- Scheduling and refresh - datasets can be refreshed on a schedule and cached so viewers see fast results.
Sharing and permissions
Viewers need access to the dashboard and permission to run the warehouse and SELECT on the underlying tables (or the dashboard runs with the owner's credentials, depending on configuration). This chain is the most common sharing failure.
Traps
- Putting a filter on a visualization when you meant a dashboard-level parameter.
- Forgetting that a dashboard binds to a specific warehouse; a stopped or deleted warehouse breaks it.
- Expecting a schedule refresh to update a dataset that is embedded with hard-coded dates.
- Assuming a published dashboard is visible to users without data privileges.
Rule of thumb
Model once, visualize many. Put joins and business logic in a gold table or a shared dataset; keep visualizations as thin aggregations. This keeps filters consistent and refresh fast.
Worked example
A sales dashboard needs a region selector affecting four charts. Create one dashboard parameter region, reference it in each dataset's WHERE clause, and add a single page-level filter widget bound to it - not four separate visualization filters.
Design notes
Use counters for single KPIs, line charts for trends over time, and bar charts for categorical comparison. Keep pages under roughly a dozen visuals so each query stays responsive on a small warehouse.