How to use Lakebase as a transactional data layer for Databricks Apps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2025 06:49 AM
Why Lakebase + Databricks Apps
Lakebase and Databricks Apps work together to simplify full-stack development on the Databricks platform:
- Lakebase gives you a fully managed Postgres database with fast reads, writes, and updates, plus modern features like branching, and point-in-time recovery.
- Databricks Apps provides the serverless runtime for your application frontend, with built-in identity, access control, and integration with Unity Catalog and other lakehouse components.
By combining the two, you can build interactive tools that store and update state in Lakebase, access governed data in the lakehouse, and serve everything through a secure, serverless UI, all without managing separate infrastructure. In the example below, we’ll show how to build a simple holiday request approval app using this setup.
Getting Started: Build a Transactional App with Lakebase
This walkthrough shows how to create a simple Databricks App that helps managers review and approve holiday requests from their team. The app is built with Databricks Apps and uses Lakebase as the backend database to store and update the requests.
Here’s what the solution covers:
- Provision a Lakebase database
Set up a serverless, Postgres OLTP database with a few clicks. - Create a Databricks App
Build an interactive app using a Python framework (like Streamlit or Dash) that reads from and writes to Lakebase. - Configure schema, tables, and access controls
Create the necessary tables and assign fine-grained permissions to the app using the App’s client ID. - Securely connect and interact with Lakebase
Use the Databricks SDK and SQLAlchemy to securely read from and write to Lakebase from your app code.
The walkthrough is designed to get you started quickly with a minimal working example. Later, you can extend it with more advanced configuration.