Skip to main content

Embed a dashboard

This recipe embeds a Databricks AI/BI dashboard into a Databricks App.

Code snippet​

app.py
import streamlit.components.v1 as components

iframe_source = "https://workspace.azuredatabricks.net/embed/dashboardsv3/dashboard-id"

components.iframe(
src=iframe_source,
height=600,
scrolling=True
)
info

Copy and paste the dashoard embedding URL from the dashboard UI Share -> Embed iframe.

Resources​

Permissions​

Your app service principal needs the following permissions:

  • CAN VIEW permission on the dashboard
info

A workspace admin needs to enable dashboard embedding in the Security settings of your Databricks workspace for specific domains (e.g., databricksapps.com) or all domains for this sample to work.

Dependencies​

requirements.txt
streamlit