Databricks 如何用 Replit 和 Lakebase 构建受治理的企业应用
How to build governed enterprise apps on Databricks with Replit and Lakebase
Databricks 与 Replit 的集成已正式可用并原生支持 Lakebase,企业团队可用 Replit Agent 基于 Databricks 实时数据构建受治理的应用,并部署为 Databricks App。
The combination of Replit & Databricks gives enterprises a complete development-to-deployment platform. With this integration, enterprise teams can build governed applications using Replit Agent that operates on live Databricks data and deploy them to Databricks Apps with native Lakebase support. Whether the user is a business leader, a data analyst, or a developer, they can utilize agentic coding to create a production app from a plain-language prompt.
Last month, we announced that the Replit | Databricks integration is generally available with native Lakebase support. In the blog, we will go beyond what we announced to why- why enterprise teams care, what apps people are building, and how to go from zero to a governed, full production app. Let's answer these questions sequentially.
Why should enterprise teams use Replit with Databricks?
Many enterprises face a dilemma. They have governed data platforms, but end users like operations managers, data analysts, and business managers still struggle to quickly build the custom apps to visualize and interact with this data.
They need a fast, frictionless way to build an app with a user-friendly front end, provision a database, build an authentication layer, enforce governance, and finally deploy to production. Each step requires different teams, and multiple approval chains.
Here’s how the integration between Replit and Databricks shorten this process:
1. Citizen Developers: Replit lets a business user describe an app in plain language. This agent will build the front end to visualize/interact with the enterprise data and auto-provision the underlying transactional database. When deploying into Databricks, Replit will enforce Databricks governance so the builder will only see data they have access to
2. Built-in Governance: The app is deployed as a Databricks App. Every app inherits automatic user authentication, secure access controls and tight integration with Unity Catalog. This saves many rounds of changes with the security and infrastructure team.
3. Native Lakebase Support: When apps are ready to be deployed, behind the scenes, Replit Agent will auto-provision a managed Lakebase Postgres database for your app's operational data. This enables your app to read live analytical data from Databricks and write its own data back to Lakebase. Lakebase acts as persistent data storage for applications.
It's important to look at how Lakebase compares to an external database. In the past, teams building apps on Databricks data had to rely on external Postgres or MySQL instances for the data that the app needs to maintain. This data, for example user inputs or app execution states, would sit outside of Databricks requiring enterprises to manage parallel governance infrastructure and permissions models. With Lakebase, you no longer need to do that.
Here's how it compares:
| Lakebase | External database | |
|---|---|---|
| Transactional Data location | Inside the Databricks perimeter | Data outside databricks |
| Permissions | Unity Catalog at runtime | Separate model to maintain |
| Setup | Auto-provisioned by Replit Agent | Manual provisioning, connection, and security |
| Governance | Inherits lineage, audit, and access controls | Requires separate compliance work |
| Cost model | Serverless and scales to zero when idle | Always-on or manually scaled |
Enterprises can build a variety of modern apps with Replit on Databricks. Let's look at the three enterprise apps that show the art of the possible.
Scenario 1: Performance Management App for Operations Leader
An operations leader would like to assess the performance of various franchises and share the performance analysis with specific franchise owners. Historically, companies have relied on their BI developers to put together dashboards for this analysis. The issues with this have always been development takes time, dashboards don't easily allow for customization or taking action, and drilling down to get to the next line of questioning was always challenging or entirely impossible.
However, with Databricks and Replit, enterprise users get the best of both worlds - speed of development and enterprise governance/security. By using a simple prompt, the operations leader can build a multi-page operations application, and the Replit agent will generate the entire app per the operations leader's specifications. It reads live, governed data straight from a Lakehouse warehouse under Unity Catalog. In production, each user's respective token is passed through, enabling data to only be shared with specific franchisee owners who are allowed to view their own sensitive data sets.
Such a performance app would be applicable to retail operations dashboards, franchise performance trackers, regional sales views, supply chain status.
Scenario 2: A document-processing pipeline for a business analyst
Finance and operations analysts have to analyze high volumes of unstructured documents like invoices, forms, and contracts, and use that data to make critical decisions instantly.
These analysts can create document processing pipeline apps that ingest these documents and uses Databricks AI functions to convert them from unstructured files (PDFs, docs, images) into structured fields. The app will allow them to query these documents, which now have been stored in the Lakebase database as structured data and make informed decisions.
This app has wide applicability across invoice processing, contract extraction, claims intake, regulatory document parsing.
Scenario 3: A full-stack app for automation manual workflows
Every organization has several manual workflows which require dealing with spreadsheets, email threads, and data sitting in various locations to drive approvals or to report updates. This could easily be addressed with an apps that automate workflows by bringing all the data together and building an approval workflow engine. It reads live analytics data from Databricks and captures new operational data in Lakebase as people use it.
We have seen customers build similar apps for approval workflows, project intake systems, vendor management tools, compliance tracking, internal request portals.
How do you set up Replit with Databricks Lakebase?
Through a four-step process, any user can build an app using Replit and deploy it as a Databricks app in the Databricks environment. It starts with connecting Databricks environment to Replit, allowing users to build a custom app from a prompt, deploy it natively to Databricks Apps with Unity Catalog governance, and automatically provision a Lakebase database for app data.
Here is the four-step flow

Getting started takes three roles and approximately 15 minutes. Your Databricks workspace should be a standard workspace without a compliance security profile, and your organization should be on the Replit Enterprise plan.
The walkthrough below uses a service principal (M2M) connector for shared access. Replit also supports a user-to-machine (U2M) connector, which lets each builder connect using their own Databricks identity. See this guide to choose the right option
Step 1: Create a service principal (Databricks admin)
In the Databricks Account Console:
- Create a service principal for the Databricks ↔ Replit connection
- Generate a client ID and secret
- Assign the service principal to the target workspace
- Grant it the appropriate permissions (typically access to the SQL warehouse and the catalogs/schemas the app will use)
Example permission grant:
Step 2: Add the Databricks connector (Replit org admin)
In Replit:
- Navigate to your organization's connector settings
- Add a new Databricks (Service Principal) connector
- Enter the client ID and secret from Step 1
- Optionally configure RBAC to control which Replit users can use the connector
Step 3: Activate and connect (Replit Enterprise user)
- Activate the Databricks connector in your Replit project
- Provide your SQL warehouse's HTTP path and server hostname to complete the connection

Step 4: Prompt, build, and deploy
- Describe the app you want to build in plain language, naming the warehouse and data you'd like to use
- Follow the agent as it explores your schema, generates queries, and builds the front end
- Test in the preview environment
- Deploy to Databricks Apps with one action

See the integration in action;
Frequently asked questions
What is the Replit Databricks integration? The combination of Replit & Databricks gives enterprises a complete development-to-deployment platform. With this integration, enterprise teams can build governed applications using Replit Agent that operates on live Databricks data and deploy them to Databricks Apps with native Lakebase support. Whether the user is business leader, or a data analyst, or a developer, they can vibe code a production app from a plain-language prompt
How does Replit connect to Databricks? Replit supports both user-to-machine (U2M) OAuth, which uses each builder’s Databricks identity and permissions, and service principal (M2M) OAuth, which uses a shared service identity. This guide walks through the service principal setup.
What is Lakebase and why does it matter for Replit apps? Databricks Lakebase Postgres is a fully managed, serverless Postgres service that runs inside the Databricks environment. For Replit apps, it provides a transactional database for storing app-specific data like user input, app execution state without requiring a separate database That sits outside the Databricks environment. Replit Agent auto-provisions the Lakebase database on deploy.
Can non-developers build apps with Replit on Databricks? Yes. Replit Agent lets a business user describe an app in plain language. This agent will not only build the front end to visualize/interact with the enterprise data, provision the underlying transactional database, it will enforce governance so that they can only see data they are authorized to see in Databricks and then deploy it into a production-ready application
How is governance enforced in Replit-built Databricks apps? The app is deployed as a Databricks App. So, every app inherits automatic user authentication, secure access controls and tight integration with Unity Catalog. This saves many rounds with the security and infrastructure team.
Can a Replit app write data back to Databricks? Yes. It can write any operational data.to Lakebase. The app can read analytical data from Databricks via a SQL warehouse and write operational data (submissions, approvals, state) to a Lakebase Postgres database.
What is Supervised AI Migration? Supervised AI Migration ensures that any database schema change proposed by Replit Agent requires team approval before it goes into production.
What are Automated Preview Deploys? Automated Preview Deploys allow you to Test your apps before they go live. Replit creates a separate test environment so that teams can build, review changes, and make adjustments in the test environment without affecting production.
What does the Replit Databricks integration cost? The integration requires a Replit Enterprise plan and Databricks consumption (SQL warehouse compute and Lakebase). Databricks compute is serverless. So, it scales up under load and idles to zero when finished, so you pay only for what you use.
Where can I see the Replit Databricks integration in action? Register for the upcoming webinar on Tuesday, November 10th "Build Full-Stack Apps on Databricks Lakebase". Watch the full build-to-deploy demo: How to Build Production-Ready Apps in Replit with Lakebase Postgres.
Next Steps
- Join our upcoming webinar on Nov 10th - A live walkthrough of building and deploying a governed app on Databricks with Replit. Register for the upcoming webinar on Tuesday, November 10th "Build Full-Stack Apps on Databricks Lakebase".
- Watch the demo — See the full build-to-deploy flow in action: How to Build Production-Ready Apps in Replit with Lakebase Postgres
- Explore the integration — Visit replit.com/partners/databricks
- Read the setup guide — Connect Replit to Databricks in the Databricks documentation
Meet us on the Data and AI World Tour — Replit is joining Databricks at World Tour stops around the world, including São Paulo, Mumbai, Chicago, New York, London, and Tokyo. Register here
来源:Databricks:Blog · databricks.com