View frequent queries and users of a table

You can use the Insights tab in Catalog Explorer to view usage trends and frequent queries, users, dashboards, notebooks, and joined tables for any table registered in Unity Catalog. The Insights tab includes a Table usage in the last 30 days graph and sections listing frequent activity for the past month.

This information can help you answer questions like:

  • Can I trust this data?
  • What are some good ways to use this data?
  • Which users can answer my questions about this data?

Note

The queries listed on the Insights tab are limited to queries performed using Databricks SQL.

Before you begin

You must have the following permissions to view frequent queries and user data on the Insights tab.

In Unity Catalog:

  • SELECT privilege on the table.
  • USE SCHEMA privilege on the table's parent schema.
  • USE CATALOG privilege on the table's parent catalog.

Metastore admins have these privileges by default. See Manage privileges in Unity Catalog.

In Databricks SQL:

  • CAN VIEW permissions on the queries. You will not see queries that you do not have permission to view. See Query ACLs.

View the Insights tab

  1. In your Azure Databricks workspace, click Data icon. Catalog to open Catalog Explorer.

  2. Search for or navigate to the table you want insights on.

    See Search for workspace objects and Explore database objects.

  3. On the table page, click the Insights tab.

    The Table usage in the last 30 days graph and sections for frequent users, queries, dashboards, notebooks, and joined tables appear.

The Insights tab showing the Table usage graph and Frequent sections.

The Table usage in the last 30 days graph and Frequent joined tables section are metastore-scoped and show activity across all workspaces attached to the metastore. The Frequent users, Frequent queries, Frequent dashboards, and Frequent notebooks sections are workspace-scoped and show activity in the current workspace only. If the usage graph shows activity but the "Frequent" sections appear empty or incomplete, the queries likely originated from a different workspace. To query user activity across all workspaces programmatically, use the lineage system tables.

You can find the most popular tables across catalogs by sorting tables in a schema by popularity. Popularity is determined by the number of interactive runs done against a table. The popularity metric captures all reads of a table, and can include reads from JDBC, the SQL Statement Execution API, SQL connectors, and sample data clicks in Catalog Explorer.

The Tables tab shows a list of popular tables, when they were created, and the owner.

Limitations

  • The frequent queries metric only captures saved queries in the SQL editor.