Can I publish the query stored in the "Query History"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2026 08:55 AM
I’m using an agent within a Databricks app that converts plain English into SQL, executes the query against a warehouse table, and returns the results.
I’d like to know if there’s a way to also surface or publish the generated SQL query within the app. I can see the query in the Query History, but I haven’t found a way to expose it directly in the app interface.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2026 09:22 AM - edited 03-17-2026 09:23 AM
- You can use the SQL string generated by agent handling the English - SQL conversion using code & display it along with results in the web app
- Query the system query history table with statement ID for statement_text (system.query.history) & display the executed query in the web app if issues in finding the query generated by agent
More details here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2026 07:07 PM
You may have to add a call to the Query History API with the necessary filter_by.