cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Inquiry on How to Return Visualizations, Images, or URLs from Databricks Genie API

Shaurya_greyhou
New Contributor

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:

  1. Return a plot or chart generated in Databricks.
  2. Provide a link to a Databricks dashboard or chart.
  3. 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. 

3 REPLIES 3

NandiniN
Databricks Employee
Databricks Employee

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!

NandiniN
Databricks Employee
Databricks Employee

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.

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?

 

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now