Inquiry on How to Return Visualizations, Images, or URLs from Databricks Genie API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2025 01:54 AM
Question 1)
I am currently working on integrating Databricks Genie with Microsoft Teams and am looking for guidance on how to return visualizations, images, or URLs in a format that can be rendered in Teams. Specifically, I am trying to figure out how to:
- Return a plot or chart generated in Databricks.
- Provide a link to a Databricks dashboard or chart.
- Return an image URL for a graph so it can be rendered directly in Teams.
I understand that the Genie API primarily supports providing data, but I am interested in knowing the best practices for integrating visual outputs such as charts or images into responses. Should I be modifying the Genie configuration or the prompt templates within Databricks to enable this? Would I need to utilize specific visualization libraries like matplotlib or plotly, or use display commands to generate and return visual outputs?
Currently I get ‘I can only execute SQL queries and provide the data. Please use your preferred visualization tool to plot the graph using the provided data.’ As a response
Question 2)
How do we enable the ai sql function such as ai_forecast. We get the following error while running the function: "AI function ai_forecast is in preview and currently disabled in this environment. SQLSTATE: 0A000" and we don’t see any place to enable the function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2025 08:33 PM - edited 04-30-2025 08:33 PM
Hi,
For question 2:
To enable ai_forecast in SQL warehouses users need to reach out to their account team and we enable it from Databricks side, In SQL it is only available on SQL pro warehouses.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2025 09:25 PM
For Q1 -
You can share a Databricks dashboard's URL to allow rendering or interaction in Microsoft Teams:
- Create a dashboard in Databricks, ensuring it contains the required visualizations or interaction widgets.
- Publish the dashboard and ensure that its credentials are embedded or permissions are properly managed.
- Obtain the dashboard's URL and include it in the response generated by Genie.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2025 12:45 AM
I am facing the same issue for Q1. Genie API is returning "I can only provide the data for the bar chart. You can use the data to create a bar chart in your preferred visualization tool.".
> Create a dashboard in Databricks, ensuring it contains the required visualizations or interaction widgets.
How can we pre-create the dashboard if the query to Genie is dynamic?