How to programatically extract rendered or computed data from AIBI Lakeview dashboard widget via API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2026 04:49 AM
- GET /api/2.0/lakeview/dashboards/{dashboard_id} Returns the dashboard definition (serialized_dashboard JSON with datasets, queries, widgets, measures). This is metadata only — no computed data.
- GET /api/2.0/workspace/export?path=/path/to/dashboard.lvdash.json Returns the same .lvdash.json definition file. Again, no data.
- GET /api/2.0/lakeview/dashboards/{dashboard_id}/published Returns published dashboard metadata (warehouse ID, publish time). No computed data.
- SQL Statement Execution API (POST /api/2.0/sql/statements) We extract queries from the dashboard definition and execute them ourselves. This works, but we're reconstructing what the dashboard does rather than reading what the dashboard actually renders.
- Jobs API (views_to_export=DASHBOARDS) Requires a job run with a dashboard task. Not applicable to standalone AI/BI dashboards.
- Extract base queries from datasets[].queryLines[] in the dashboard definition
- Resolve MEASURE() references from columns[] definitions
- Apply filters as WHERE clauses (same way Lakeview does internally)
- Execute via databricks-sql-connector on the same SQL Warehouse
- Compare results against independently written expected queries
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2026 07:52 AM
Hi ,
My view is that the testing approach should focus on validating the underlying data and query logic, rather than the rendered visual itself.
AI/BI Dashboards are built from datasets, visualisations, and filters. In other words, the chart or table a user sees is a presentation of a dataset after aggregations, filtering, and formatting have been applied. If the goal is data quality validation, the most stable thing to test is the data contract behind the dashboard which includes source tables, views, metric definitions, dataset SQL, and expected filter behaviour.
That is usually a better fit than testing "what the widget rendered" for a few reasons:
- Visuals are not the source of truth. The source of truth is the underlying dataset and business logic.
- Dashboards can apply visualisation-specific filtering and aggregation differently depending on dataset size and execution path.
- Rendering itself has limits and optimisations, so validating the visual can end up mixing data correctness with presentation/runtime behaviour.
Databricks documents this behaviour explicitly. For smaller datasets, the dataset result can be pulled to the client, and visualisation-specific filtering and aggregation are performed in the browser. For larger datasets, visualisation-specific filtering and aggregation are performed on the backend instead. That means there is not always a single simple "widget result" object exposed as a stable public API contract that exactly represents what was rendered.
So in practice, I would recommend:
- Validate the source tables/views or metric views.
- Validate the dashboard dataset SQL.
- Validate expected filter semantics and aggregations.
- Use dashboard-level checks only as smoke tests to confirm the dashboard is wired correctly.
That last point matters. There is still value in lightweight dashboard tests, for example:
- confirming the right filters affect the right widgets
- confirming expected aggregations are shown
- confirming cross-filtering or drill-through behaves as expected
But I would treat those as product behaviour checks, not as the primary layer for data quality testing.
So the short version is.. validating the underlying data is the better and more reliable approach than validating the visuals themselves. The visuals are important for user experience, but the data layer is the right place to anchor automated correctness tests.
If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.
Ashwin | Delivery Solution Architect @ Databricks
Helping you build and scale the Data Intelligence Platform.
***Opinions are my own***
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2026 11:09 PM
Thanks for u detailed answer on the dashboard validation testing.
- Dashboard page load time (navigation start → all widgets rendered)
- Time to First Contentful Paint (FCP) and Largest Contentful Paint (LCP)
- Number and duration of backend SQL queries triggered during dashboard load
- How response times degrade when 10, 25, 50 users open the same dashboard simultaneously
- SQL Warehouse query queuing behavior under concurrent dashboard load
- Use Playwright (headless Chromium) to open the dashboard URL
- Capture performance.timing, paint entries, and network request durations
- Simulate concurrent users by launching multiple browser contexts in parallel
- Wait for networkidle state as a proxy for "dashboard fully loaded"
- Databricks on AWS
- AI/BI Dashboard (Lakeview), published
- SQL Warehouse (serverless)
- Playwright (Python) for browser automation
- 10–50 simulated concurrent users