Creating a persistent query history table using the REST API

WWoman
Databricks Partner

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?