- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2025 01:17 AM
Hi all,
I have an asset bundle that contains the following dashboard_task:
resources:
jobs:
my_job:
name: my_job_name
tasks:
- task_key: refresh_my_dashboard
dashboard_task:
dashboard_id: ${var.my_dashboard_id}Here I would like to use the `my_dashboard_id` variable, so that it automatically substitutes the ID of the dashboard when deployed on different workspaces. So in my `databricks.yml` file, at bundle level, I have the following variables mapping:
variables:
my_dashboard_id:
lookup:
dashboard: My_Dashboard_NameHowever, this returns an error during bundle validation:
Error: failed to resolve dashboard: My_Dashboard_Name, err: Dashboard named 'My_Dashboard_Name' does not existI am certain that the dashboard exists and that I have the necessary permissions.
Furthermore, when I run `databricks dashboards list`, no dashboards are found. I saw in the databricks cli documentation that `databricks dashboards` are commands for modifying legacy dashboards. This would explain why no dashboards are found when I run that. Is it possible that the lookup in the bundle configuration also looks for legacy dashboards?
Any help with getting this work would be much appreciated. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2025 02:28 AM
You're right to be confused, what's happening is that the dashboard lookup in your bundle only works with legacy dashboards, not the newer Lakeview dashboards. That’s why the lookup fails and databricks dashboards list comes up empty. Unfortunately, the bundle system doesn’t yet support looking up Lakeview dashboards by name. For now, the best workaround is to manually grab the dashboard ID from the Databricks UI or API and pass it through your .env file or with a --var flag when deploying. Hopefully, full support will come in a future update!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2025 02:28 AM - edited 07-13-2025 02:33 AM
Thanks! That does make sense. When I run `databricks lakeview list` I do get the dashboard I want:
[
{
"create_time": "2025-06-23T08:09:49.595Z",
"dashboard_id": "id000000000000000000000",
"display_name": "My_Dashboard_Name",
"lifecycle_state": "ACTIVE",
"warehouse_id": "id0000000000000"
}
]Will just have to be patient then 🙂 thanks!