cancel
Showing results for 
Search instead for 
Did you mean: 
Community Discussions
cancel
Showing results for 
Search instead for 
Did you mean: 

Export notebook dashboard

Kayla
Contributor

I'm looking to find way to export notebook dashboards as HTML files.

We will be scheduling the notebook via workflows, so I'm not sure if we'd be looking at exporting something from the workflow via API or if there's a better way to do this.

I'm also curious on the distinctions between the dashboards that show up in notebooks versus the SQL Workspace Dashboard section.

1 ACCEPTED SOLUTION

Accepted Solutions

Kaniz
Community Manager
Community Manager

Hi @KaylaLet’s break down your requirements and explore the options for exporting notebook dashboards as HTML files.

  1. Exporting Notebook Dashboards to HTML:

    • To export a notebook dashboard to an HTML file, you have a couple of approaches:
      • Manual Export:
      • Automated Export via API:
        • If you want an automated process, consider using Databricks’ API.
        • Specifically, you can use the Jobs API to schedule exports. Here’s how:
          • Use the jobs export API call with the appropriate parameters:
            • run_id: Get the latest run ID (you can schedule this to run periodically).
            • views_to_export: Specify DASHBOARDS to export the dashboard view.
            • Defaults to CODE if not specified.
          • Example request structure:
            POST /api/2.0/jobs/export
            {
                "run_id": "latest",
                "views_to_export": "DASHBOARDS"
            }
            
          • For more details, refer to the Databricks Jobs API documentation2.
  2. Distinctions Between Notebook Dashboards and SQL Workspace Dashboard:

    • Notebook Dashboards:
      • These are interactive dashboards created within a notebook.
      • They allow you to visualize data, create charts, and display insights.
      • You can combine code, visualizations, and explanatory text.
      • Notebook dashboards are specific to individual notebooks.
    • SQL Workspace Dashboard:
      • This is a separate section in Databricks where you can create and manage dashboards.
      • SQL Workspace dashboards are not tied to a specific notebook.
      • They allow you to build visualizations directly from SQL queries.
      • You can share SQL Workspace dashboards across multiple notebooks and users.

In summary, if you need automation, use the Jobs API for exporting dashboard views. And remember that notebook dashboards are tied to specific notebooks, while SQL Workspace dashboards...23.

 

View solution in original post

1 REPLY 1

Kaniz
Community Manager
Community Manager

Hi @KaylaLet’s break down your requirements and explore the options for exporting notebook dashboards as HTML files.

  1. Exporting Notebook Dashboards to HTML:

    • To export a notebook dashboard to an HTML file, you have a couple of approaches:
      • Manual Export:
      • Automated Export via API:
        • If you want an automated process, consider using Databricks’ API.
        • Specifically, you can use the Jobs API to schedule exports. Here’s how:
          • Use the jobs export API call with the appropriate parameters:
            • run_id: Get the latest run ID (you can schedule this to run periodically).
            • views_to_export: Specify DASHBOARDS to export the dashboard view.
            • Defaults to CODE if not specified.
          • Example request structure:
            POST /api/2.0/jobs/export
            {
                "run_id": "latest",
                "views_to_export": "DASHBOARDS"
            }
            
          • For more details, refer to the Databricks Jobs API documentation2.
  2. Distinctions Between Notebook Dashboards and SQL Workspace Dashboard:

    • Notebook Dashboards:
      • These are interactive dashboards created within a notebook.
      • They allow you to visualize data, create charts, and display insights.
      • You can combine code, visualizations, and explanatory text.
      • Notebook dashboards are specific to individual notebooks.
    • SQL Workspace Dashboard:
      • This is a separate section in Databricks where you can create and manage dashboards.
      • SQL Workspace dashboards are not tied to a specific notebook.
      • They allow you to build visualizations directly from SQL queries.
      • You can share SQL Workspace dashboards across multiple notebooks and users.

In summary, if you need automation, use the Jobs API for exporting dashboard views. And remember that notebook dashboards are tied to specific notebooks, while SQL Workspace dashboards...23.

 
Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.