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:ย 

Persisting query history data

WWoman
New Contributor III

Hello,

I am looking for a way to persist query history data. I have not have direct access to the system tables. I do have access to a query_history view created by selecting from the system.query.history and system.access.audit system tables. I want to create a simple process that will incrementally load the data that I access through the view into a table..

What is the simplest way to achieve this?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

yuriy
New Contributor III

Hi @WWoman you can set up a simple append only DLT pipeline or just schedule a job that will run merge statement insert * only. In both cases you will get a table that will accumulate history of additions in your view over time and in both cases it will be incremental

View solution in original post

2 REPLIES 2

yuriy
New Contributor III

Hi @WWoman you can set up a simple append only DLT pipeline or just schedule a job that will run merge statement insert * only. In both cases you will get a table that will accumulate history of additions in your view over time and in both cases it will be incremental

syed_sr7
New Contributor II

Is any system table there for query history?

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