cancel
Showing results for 
Search instead for 
Did you mean: 
Warehousing & Analytics
Engage in discussions on data warehousing, analytics, and BI solutions within the Databricks Community. Share insights, tips, and best practices for leveraging data for informed decision-making.
cancel
Showing results for 
Search instead for 
Did you mean: 

Display Pyspark Widget in UI Dashboard

HeathDG1
New Contributor II

Hi-

I have a spark DF that I create a visual from, I added a dbutils widget to filter the visual. I want to display the visual in our current IU dashboards (that were created with SQL datasets and calculated measures) but when I click on the drop down below I only get the option to add to a notebook dashboard not our current published dashboards like  which we created with the UI. 


Please advise. 

Thank you! 

1 REPLY 1

Advika_
Databricks Employee
Databricks Employee

Hello @HeathDG1!

It looks like your visualization was created in a Databricks Notebook using the dbutils widget for filtering. However, Databricks only allows SQL-based visualizations to be added to AI/BI dashboards, while notebook visuals can only be used in notebook dashboards, which is why you don't see the option to add it.
To fix this, convert your spark DF into a SQL compatible dataset by saving it as a Delta table (df.write.saveAsTable("table_name")), then recreate the visuals in the UI dashboard using a SQL query with parameter syntax (WHERE column_name = "some_value") instead of dbutils widgets.