cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Governance
Join discussions on data governance practices, compliance, and security within the Databricks Community. Exchange strategies and insights to ensure data integrity and regulatory compliance.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Creating a persistent query history table using the REST API

WWoman
New Contributor III

Hello all,

I am looking for a way to load a persistent query history table from the query history REST API (including metrics). I do know about the system table system.query.history, but I do not have access to it.

I am looking to create a python script to load this table on a daily basis. Does anyone have code they'd be willing to share?

1 REPLY 1

MoJaMa
Databricks Employee
Databricks Employee

Hi,

Can you check if you have access to this?

https://github.com/dbsys21/lakehouse-tacklebox/tree/main/40-observability/dbsql-query-history-sync

Ideally your organization should enable the system tables and provide the necessary access, so each team doesn't have to reinvent the wheel.

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