databricks-streamlit-demo icon indicating copy to clipboard operation
databricks-streamlit-demo copied to clipboard

Demo of Streamlit application with Databricks SQL Endpoint

Demo of Streamlit application with Databricks SQL Endpoint

Table of Contents

  • Demo of Streamlit application with Databricks SQL Endpoint
    • Prerequisites
    • Quick demo
    • How to
    • References

Prerequisites

  • Databricks SQL endpoint
  • Free Mapbox token - generate one here
  • Locally: Docker, Makefile

Quick demo

demo

How to

  1. Create or start an existing SQL endpoint of any size in your Databricks workspace
  2. Create new query and define the database and table:
CREATE DATABASE IF NOT EXISTS streamlit_demo_db;
CREATE TABLE IF NOT EXISTS streamlit_demo_db.nyctaxi_yellow 
USING DELTA
LOCATION "dbfs:/databricks-datasets/nyctaxi/tables/nyctaxi_yellow";
  1. On local machine, clone the repository and create .env file in the repository directory. Follow the .env.sample for instructions.
  2. On local machine, launch make run to start the server
  3. Open http://localhost:8052 and enjoy the new application :)

References