Skip to main content

How do I get started building apps on Databricks?

Summary

  • Databricks Apps lets you build full-stack applications directly on the platform: Python or JavaScript on the backend, React or Python frameworks on the frontend, all running on managed serverless compute.
  • You need three things: a Databricks workspace with appropriate permissions, knowledge of Python (Flask, Streamlit) or JavaScript (Node.js, React), and an understanding of how your app accesses data in the lakehouse.
  • The simplest app is a Streamlit app that queries tables from Unity Catalog and displays results. You write it in Python, commit it to a Git repository, and Databricks hosts and deploys it automatically.
  • Apps inherit authentication and access control from Unity Catalog: no need to build custom auth or permission logic. Every user who accesses the app is subject to the same data governance as direct SQL queries.
  • The full development cycle is local testing in your IDE, commit to Git, and Databricks automatically detects the change and deploys the new version. No containers, no infrastructure setup.

How do I get started building apps on Databricks?

Getting started with Databricks Apps requires understanding three layers: how to set up the project structure and development environment, how to connect your app to the lakehouse, and how to deploy and manage access. The process is simpler than traditional app hosting because Databricks handles authentication, hosting, permissions, and scaling automatically. Your first app can be operational in less than an hour.

Prerequisites and workspace setup

You need a Databricks workspace with the appropriate permissions. Apps require that you have the ability to create new apps in your workspace (ask your administrator if unsure). You should be familiar with either Python or JavaScript, depending on which you prefer. You do not need to know DevOps, containers, or infrastructure. Databricks Apps abstracts all of that away.

Choose your framework

Databricks Apps supports two stacks. For Python backends, use Flask, FastAPI, or Streamlit. Streamlit is the fastest path to a working app: it handles the UI for you and requires minimal boilerplate. For JavaScript backends, use Node.js with Express or frameworks like Next.js, combined with React on the frontend.

Framework Language Best for Time to first working app
Streamlit Python Rapid prototyping, data dashboards, internal tools Minutes
Flask Python REST APIs, lightweight services, custom control Hours
FastAPI Python High-performance APIs, async workloads, modern Python Hours
Express + React JavaScript Full-stack web apps, complex UIs, team familiarity Half day
Next.js + React JavaScript Server-side rendering, full-stack apps, performance Half day

If you are new to app development, start with Streamlit. It compiles Python functions directly into a web interface, so you can build a working app with just a few lines of code. If you need more control or are building a production web service, use Flask or FastAPI on the backend with React on the frontend.

Connecting your app to the lakehouse

Your app accesses data through the Databricks SQL API or the Python SQL connector. You do not write connection strings or manage credentials. Instead, you use the Databricks SDK in your code, and the SDK automatically infers credentials from the workspace context.
Example Python code:
Inside the app, use the Databricks SQL Connector for Python to open a connection to a SQL warehouse, run a query against a Unity Catalog table through a cursor, and return the rows to your UI.
Your query respects the same data access controls as direct SQL queries. If a user cannot query a table in Unity Catalog, their app cannot either. You do not need to implement custom authorization logic.

Project structure and Git integration

Apps are defined in a Git repository with a simple structure: your app code in a src/ directory, an app.yaml manifest file that tells Databricks how to run your app, and a requirements.txt (Python) or package.json (JavaScript) that specifies dependencies. Databricks watches your repository. When you commit and push, Databricks automatically detects the change, rebuilds, and deploys the new version. No manual deployment commands or CI/CD configuration required.

Development and testing workflow

During development, run your app locally in your IDE using the Databricks CLI (e.g., databricks apps run for Streamlit, or npm start for JavaScript). Test locally against a dev database or a subset of production data. Once you are confident, commit to your repository, and Databricks deploys it live. If you need to roll back, revert the Git commit, and Databricks redeploys the previous version automatically.

Security and permissions

Every app is a first-class object in your workspace, governed by Unity Catalog. You define who can access the app using role-based access control. Users authenticate through their Databricks identity (OIDC/OAuth). Audit logs record which users accessed which app and when. Data access is enforced at query time: users see only the data they have permission to access in Unity Catalog.

FAQs

What is the simplest app I can build?

A Streamlit app that queries a table and displays results. For example, a short Streamlit script can query a governed table with the SQL connector and render the results as a table or chart. See Databricks Apps.

Do I need to manage authentication or permissions?

No. Authentication is built in (users log in with their Databricks identity). Permissions are inherited from Unity Catalog automatically.

Can I use Python libraries that require system-level dependencies?

Most standard libraries work. If your app requires system packages (e.g., ffmpeg, graphviz), contact your administrator about image customization.

How do I monitor app usage and errors?

Databricks provides logs and metrics for every app in the workspace. Logs show every request, response, and error. You can also integrate custom logging from your application code.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.