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: 

How to create a raw data (with filter_by) to pull query history from now to 5 mins ago

Chinu
New Contributor III

Hi Team,

Is it possible I can use "query_start_time_range" filter from the api call to get the query data only from now to 5 mins ago?

Im using telegraf to call query history api but it looks like Im reaching the max return and I can't find how to use the pagination from telegraf.

My idea is running telegraf every 5 min and get the query history for the last 5 mins.

Thanks for the help.

Chinu Lee

1 ACCEPTED SOLUTION

Accepted Solutions

mathan_pillai
Databricks Employee
Databricks Employee

Have you checked this https://docs.databricks.com/api-explorer/workspace/queryhistory/list you can list the queries based on time range as well. So you can try passing the fields in the filter_by parameter. Then pass the value as (current time - 5 min)

View solution in original post

1 REPLY 1

mathan_pillai
Databricks Employee
Databricks Employee

Have you checked this https://docs.databricks.com/api-explorer/workspace/queryhistory/list you can list the queries based on time range as well. So you can try passing the fields in the filter_by parameter. Then pass the value as (current time - 5 min)

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