Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Collateral associated with Medium Article - showing integration of Dash apps and Databricks SDK

Notifications You must be signed in to change notification settings

plotly/Dash-Databricks-SDK-Article

Repository files navigation

Dash + Databricks SDK App Walkthrough

Links

Medium Article

App Preview

jobsapi

Background

In short, the purpose of this project is to demonstrate how Plotly's Dash can be utilized in tandem with the Databricks SDK. More specifically, here we choose to kick off and parameterize a Databricks notebook from a dash application, either running locally, on Heroku, or on Dash Enterprise.

For more information on background and our joint story, please visit our Databricks + Plotly Dash Partner page.

For information on how to get started, see the below instruction set.

Instructions

On Databricks:

  1. Ensure that you have permissions on Databricks to kick of Jobs via the Jobs API. Check with your Databricks workspace administrator if you do not, or if any commands in this project fail unusually.

  2. Upload the Databricks-SDK-Dash-Jobs-Notebook.ipynb file to Databricks by clicking (+ New) -> Notebook (screenshot below). upload

  3. Run the notebook, and attach it to the cluster that you would like to utilize. Importantly, get the Datbricks cluster's ID. You will utilize this in your dash app's .env file locally. Link.

On your own computer:

  1. Use git clone [email protected]:plotly/Dash-Databricks-SDK-Article.git to clone this repository to your local filesystem.
  2. Ensure that you have a .databrickscfg file that contains your Databricks domain and PAT. By default, it should be located in your base directory. i.e. /.databrickscfg The file structure should resemble the example provided in this repository, with your Databricks host name and personal access token.
  3. cd into your project directory (called Databricks-Dash-SDK-Article by default)
  4. Remove .databrickscfg from your project's directory, proivded you have it already at your base directory (step 2).
  5. In .env file, copy-paste your cluster's ID into the DATABRICKS_CLUSTER_ID field.
  6. Modify constants.py as needed. Mainly, you may choose to rename the Databricks notebook provided in this project. If so, reflect those changes by modifying the notebook_name variable.
  7. Run pip install -r requirements.txt
  8. Run python app.py to get started!

About

Collateral associated with Medium Article - showing integration of Dash apps and Databricks SDK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published