Hi
you can use SDK from your DataBricks notebook. Here comes example how can you do that:
%pip install databricks-sdk --upgrade<div><span>Restart Python kernel<li-code lang="markup">dbutils.library.restartPython()<p>List your queries history:<li-code lang="markup">from databricks.sdk import WorkspaceClient
w = WorkspaceClient()
for q in w.query_history.list():
print(f"Query: {q.as_dict()['query_id']} \nStart Time: {q.as_dict()['query_start_time_ms']} \
\nQuery text: {q.as_dict()['query_text']}\n")
Everything in the same notebook.
Good luck
** You might also want to subscribe to Warsaw Databricks YT channel: https://www.youtube.com/channel/UC1-u_2nI97cNHtu_FQ3HP_A