2 weeks ago - last edited 2 weeks ago
Hi all
I am developing a Databricks app. I will use Databricks asset bundles for deployment.
How can I connect Databricks streamlit app into Databricks unity catalog?
Where should I define the credentials? (Databricks host for dev, qa and prod environments, users, passwords etc)
Which compute should I choose? (SQL Warehouse, All Purpose Compute etc)
Thanks
2 weeks ago
Hi,
As a starter you may want to try deploying the streamlit starter app from the app UI, this will show you the pattern to connect and pull data into your streamlit app. The following then gives some best practise guidelines on your questions:
Streamlit apps run as Databricks Apps within your workspace. To enable data access via Unity Catalog:
uc_securable, registered_model, schema, or volume types.Note: As of late 2025, mounting UC volumes directly in Streamlit apps via /Volumes is not supported ("Can I mount a Unity Catalog volume in my app? Not today.") but you can use SDK or direct APIs to interact with UC assets.
Databricks Asset Bundles support robust environment (dev/qa/prod) isolation and credential management via configuration files and best practices:
databricks.yml bundle for dev, qa, and prod. Each target can have its own workspace (host), compute resources, and variables..databrickscfg), which are stored securely in your deployment environment (e.g., your CI/CD system). The CLI then picks up the appropriate host, token, client_id, etc., from the matching profile.DATABRICKS_TOKEN, DATABRICKS_CLIENT_SECRET) set in your CI/CD environment or local dev machine, not in code or bundle files.targets:
dev:
workspace:
host: https://<dev-workspace-url>
qa:
workspace:
host: https://<qa-workspace-url>
prod:
workspace:
host: https://<prod-workspace-url>
Your CI/CD pipeline (e.g., GitHub Actions, Azure DevOps) should set up the corresponding .databrickscfg files or environment variables for each environment.
The right compute depends on your workload:
apps:
my_streamlit_app:
source_code_path: ./app
resources:
- name: prod-sqlwh
sql_warehouse:
id: ${var.sql_warehouse_id}
permission: CAN_USE
You can similarly define clusters (All Purpose Compute) and assign them via cluster_id.
targets for dev, qa, prod; keep workspaces and catalogs isolated.2 weeks ago
Hi,
As a starter you may want to try deploying the streamlit starter app from the app UI, this will show you the pattern to connect and pull data into your streamlit app. The following then gives some best practise guidelines on your questions:
Streamlit apps run as Databricks Apps within your workspace. To enable data access via Unity Catalog:
uc_securable, registered_model, schema, or volume types.Note: As of late 2025, mounting UC volumes directly in Streamlit apps via /Volumes is not supported ("Can I mount a Unity Catalog volume in my app? Not today.") but you can use SDK or direct APIs to interact with UC assets.
Databricks Asset Bundles support robust environment (dev/qa/prod) isolation and credential management via configuration files and best practices:
databricks.yml bundle for dev, qa, and prod. Each target can have its own workspace (host), compute resources, and variables..databrickscfg), which are stored securely in your deployment environment (e.g., your CI/CD system). The CLI then picks up the appropriate host, token, client_id, etc., from the matching profile.DATABRICKS_TOKEN, DATABRICKS_CLIENT_SECRET) set in your CI/CD environment or local dev machine, not in code or bundle files.targets:
dev:
workspace:
host: https://<dev-workspace-url>
qa:
workspace:
host: https://<qa-workspace-url>
prod:
workspace:
host: https://<prod-workspace-url>
Your CI/CD pipeline (e.g., GitHub Actions, Azure DevOps) should set up the corresponding .databrickscfg files or environment variables for each environment.
The right compute depends on your workload:
apps:
my_streamlit_app:
source_code_path: ./app
resources:
- name: prod-sqlwh
sql_warehouse:
id: ${var.sql_warehouse_id}
permission: CAN_USE
You can similarly define clusters (All Purpose Compute) and assign them via cluster_id.
targets for dev, qa, prod; keep workspaces and catalogs isolated.Passionate about hosting events and connecting people? Help us grow a vibrant local communityโsign up today to get started!
Sign Up Now