From Databricks SQL query history , we get what query is coming from source = Powerbi.
How to know metadata here like what is the workspace id or what is the dataset id.
We tried to fetch the query history using API (but most information is missing)
url = f"{DATABRICKS_INSTANCE}/api/2.0/sql/history/queries" headers = { "Authorization": f"Bearer {TOKEN}", "Content-Type": "application/json" } all_queries = [] next_page_token = None while True: params = {} if next_page_token: params['page_token'] = next_page_token