Dashboard Usage
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2024 02:01 AM
Hi there,
My team is developing some SQL Dashboards. I would like to know how many people view that dashboard/or at least click to it and then queries triggered.
I found out that there is one endpoint provided by Databricks: List Queries | Query History API | REST API reference | Azure Databricks
As I can see on the UI, that query comes from which Dashboard, but we I call the above API, there's no field like `dashboard_id`.
Is there anything I missed here
- Labels:
-
Delta Lake
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2024 03:11 AM
By enabling system tables, you should be able to retrieve the desired information from the audit logs system table. I hope the following official documentation is helpful:
Audit Logs - Databricks Documentation
Takuya Omi (尾美拓哉)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2024 06:51 AM
Thank you for the response.
But I have one more question: can it be done using API ?
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2024 07:04 AM
My case is:
There are several reports/queries in a dashboard. When I click to one dashboard, it will run all the queries, and that info will be shown in Query History.
In Query History, I can see the detail for each query and also what is the dashboard sticking to it. But when I call the API to get query history, I dont see any field like dashboard id 😕
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2024 07:47 AM
If your requirement is to retrieve the number of dashboard viewers, you can achieve this using the SQL query described in the previously shared audit logs documentation.
If you prefer to retrieve this information via an API, you can use the Statement Execution API.
As for the List Queries, I couldn’t find any fields related to dashboard id in its response.
Takuya Omi (尾美拓哉)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2024 02:35 AM
When I click to the dashboard, there are 6 statements in my dashboard -> I receive 6 records in `system.access.audit`.
But the event_time is different, I expect event_time should be the same across records. So with the differences in event time, how can I know how many views that my dashboard got. I only hit the dashboard 1 time, I have to count it 1 view, not 6 views

