cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Get queries history run on UC enabled interactive cluster

ayush25091995
New Contributor III

Hi Team,

I want to derived couple of kpis like most frequent queries, top queries, query type like select, insert or update on UC enabled interactive cluster. 

I know we can do this for SQL warehouse but what is the way we can do this interactive cluster?. plz help it is urgent.

i checked system.audit table but there entries are not consistent. if i run normal select query, audit tables is showing 2 to 3 entries in table, all 3 rows are same except event_id.

 

Plz help .

2 REPLIES 2

Kaniz_Fatma
Community Manager
Community Manager

Hi @ayush25091995To get the query history on a Unity Catalog (UC) enabled interactive cluster in Databricks, you can use the system.query_history table. This table provides detailed information about the queries run on the cluster, including the query text, user, start time, end time, and more.

If you find inconsistencies in the system.audit table, it might be due to the way events are logged. Ensure that your cluster is properly configured to use Unity Catalog and that all necessary permissi....

If you encounter any issues or need further assistance, feel free to ask! 

ayush25091995
New Contributor III

@Kaniz_Fatma , this table will only the query history for sql warehouse cluster, i need for UC interactive/All purpose cluster. 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group