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
Valued Contributor
Valued Contributor

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
Valued Contributor
Valued Contributor

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)

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!