Re-Using Datasets inside the Same SQL Dashboard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2024 09:06 AM
Hi folks, I am creating a SQL dashboard and want to know if I can re-use datasets within the same dashboard.
The screenshot below captures what I would like to do pretty well, but to summarize... I need to run an computationally expensive query and want to visualize those results in a figure on the dashboard. I then need to aggregate that table further to create additional figures. Is there a way I can call the first query again so that my SQL warehouse does not need to run that expensive first query twice?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2024 03:49 PM
You should be able to do it by using static widgets as mentioned in docs https://docs.databricks.com/en/dashboards/index.html#static-widget-parameters
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2024 06:48 PM
This still needs a solution. @Walter_C gave a reference to having two visualizations use the same dataset. This question (and my current problem) is about referencing a SQL dataset as if it was a view inside another SQL dataset in the dashboard. Dataset "my_agg" references dataset "my_raw" in the same dashboard (this is before any visualizations are defined, so parameters and widgets have no bearing yet).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 01:55 PM
Bumping this. I also have a use case where it would be beneficial to reference one dataset from another dataset.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Would appreciate a solution on this at the earliest as well. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
@rskuntoji24 My current workaround has been to create the first query as a materialized view in my catalog, and then run a workflow daily to update the view.
The downsides to this strategy is that it might not be practical for streaming data (not an issue for me personally), and creating a materialized view is saving the data that the query outputs somewhere (so storage requirements are increasing). I am not sure exactly where materialized view data is being stored, but I would guess somewhere on your cloud provider... perhaps someone like @Walter_C could confirm.

