OntoBricks Deployment Guide
Contents
Contents
- Overview
- Architecture
- 1. Local Development Setup
- 2. Databricks Apps Deployment (DAB)
- 3. Unity Catalog Permissions for the Service Principal
- 4. Permission Management
- 5. Deploying to a New Workspace
- 6. Triple Store & Graph DB Backend Configuration
- 7. MCP Server Deployment (Databricks Playground)
- 8. MLflow Agent Observability
- 9. DAB Reference
- 10. Full Deployment Checklist
- 11. Troubleshooting
- 12. Production Considerations
- Deployment checklist
- Asset Bundle reference
- Production sizing questionnaire
Overview
This guide covers deploying OntoBricks both locally for development and to Databricks Apps for production use, including the optional MCP server for Databricks Playground integration and instructions for deploying to a new workspace.
Deployment uses Databricks Asset Bundles (DAB) — a declarative, repeatable approach that deploys both apps in a single command from databricks.yml at the project root.
Architecture at a glance:
┌──────────────────────┐ ┌──────────────────────┐
│ ontobricks-XXX │ │ mcp-ontobricks │
│ (Databricks App) │◄─────│ (Databricks App) │
│ │ REST │ │
│ Web UI + REST API │ API │ MCP Server for │
│ Graph Viewer │ │ Databricks │
│ │ │ Playground │
└──────────┬───────────┘ └──────────────────────┘
│
├──────────────────┐
▼ ▼
┌───────────────────────────────────┐
│ SQL Warehouse (Delta view) │
│ + Lakebase Postgres (Graph DB) │
└───────────────────────────────────┘
│
▼
┌───────────────┐
│ MLflow │
│ Tracking │
│ (Experiments) │
└───────────────┘
Key files:
| File | Purpose |
|---|---|
databricks.yml |
Bundle definition — apps, permissions, targets, sync.exclude |
app.yaml |
Main app runtime config — command, env vars, resource declarations |
src/mcp-server/app.yaml |
MCP server runtime config |
.databricksignore |
Human/test mirror of sync.exclude — the CLI does not read it |
scripts/deploy.sh |
Convenience wrapper around DAB commands |
Architecture
This section provides detailed diagrams covering the OntoBricks component topology, Lakebase Postgres schema layout, data-flow through the Knowledge Graph build pipeline, network ports, and all permission layers required for a production deployment.
A. Component Architecture
┌──────────────────────────────────────────────────────────────────────────┐
│ Databricks Workspace │
│ │
Browser users ──► │ ┌───────────────────────────────────────────────────────────────────┐ │
│ │ ontobricks-XXX (Databricks App) │ │
│ │ FastAPI + Uvicorn · port: $DATABRICKS_APP_PORT │ │
│ │ │ │
│ │ ┌──────────────────┐ ┌──────────────────┐ ┌─────────────────┐ │ │
│ │ │ Web UI │ │ REST API │ │ GraphQL │ │ │
│ │ │ (Jinja2 + JS) │ │ /api/v1/* │ │ /graphql │ │ │
│ │ └──────────────────┘ └──────────────────┘ └─────────────────┘ │ │
│ │ │ │
│ │ LLM Agents (domain-saved AI Gateway or Model Serving): │ │
│ │ OWL Generator · Auto-Assignment · Ontology Assistant │ │
│ │ Digital-Twin Chat · Cohort Generator · Auto-Icon Assign │ │
│ └────────────────────────┬────────────────────────────────────────── ┘ │
│ │ REST /api/v1/* (OAuth M2M) │
Playground ──────►│ ┌────────────────────────▼──────────────────────────────────────┐ │
Cursor / Claude │ │ mcp-ontobricks (Databricks App) │ │
(MCP protocol) │ │ FastMCP · Uvicorn · port: $DATABRICKS_APP_PORT │ │
│ └───────────────────────────────────────────────────────────────┘ │
│ │
│ ═══════════════════════ Bound Resources ═══════════════════════════════ │
│ │
│ ┌──────────────────┐ ┌─────────────────────────┐ ┌─────────────────┐ │
│ │ SQL Warehouse │ │ UC Volume │ │ Lakebase │ │
│ │ CAN_USE │ │ WRITE_VOLUME │ │ Postgres │ │
│ │ │ │ /Volumes/<c>/<s>/<vol> │ │ CAN_CONNECT │ │
│ │ · SPARQL → SQL │ │ │ │ _AND_CREATE │ │
│ │ · Delta VIEWs │ │ · OWL / R2RML artefacts │ │ (dev-lakebase) │ │
│ │ · UC metadata │ │ · Domain files │ │ │ │
│ │ · Lakeflow sync │ │ · History / audit logs │ │ · Registry │ │
│ └──────────────────┘ └─────────────────────────┘ │ tables │ │
│ │ · Graph triple │ │
│ ┌────────────────────────┐ ┌──────────────────┐ │ store │ │
│ │ AI Gateway / Serving │ │ MLflow Tracking │ └─────────────────┘ │
│ │ (domain LLM targets) │ │ /Shared/onto… │ │
│ │ │ │ (agent traces) │ │
│ └────────────────────────┘ └──────────────────┘ │
└──────────────────────────────────────────────────────────────────────────┘
B. Lakebase as Graph DB — Schema Layout
OntoBricks uses Lakebase Postgres (Autoscaling) as both its registry store (structured metadata) and its Graph DB (triple store). Three schemas live inside the same Postgres database; each is bootstrapped at a different stage of the deployment lifecycle.
╔══════════════════════════════════════════════════════════════════════════════════════════╗
║ Lakebase Postgres — Autoscaling project, bound via app.yaml resource ║
║ Database (datname): ontobricks_registry (or databricks_postgres in legacy) ║
╠═══════════════════════════════════════╦════════════════════════════════════════════════╣
║ Schema: ontobricks_registry ║ Schema: ontobricks_graph ║
║ Created by: Settings → Initialize ║ Created by: first Knowledge Graph Build ║
║ Granted by: make bootstrap-lakebase ║ Granted by: make bootstrap-lakebase ║
╠═══════════════════════════════════════╣════════════════════════════════════════════════╣
║ registries ║ Per-domain, per-version triple tables: ║
║ └ one row per OntoBricks instance ║ ║
║ global_config (JSONB settings) ║ g_<domain>_v<n>_sync ║
║ domains (folder tree) ║ ← triples bulk-loaded by: ║
║ domain_versions (full documents) ║ · app_managed: COPY FROM STDIN ║
║ domain_permissions (roles / ACL) ║ · managed_synced: Lakeflow snapshot ║
║ schedules (build definitions) ║ ║
║ schedule_runs (build run history) ║ g_<domain>_v<n>__app ║
║ domain_edit_locks (DRAFT edit lock) ║ ← reasoning results / cohort writes ║
║ ║ ║
║ ║ g_<domain>_v<n> (UNION VIEW — read only) ║
║ ║ ← target of SPARQL queries ║
║ ║ SELECT … FROM _sync UNION ALL __app ║
║ ║ ║
║ ║ Columns: subject · predicate · object ║
║ ║ datatype · lang ║
╠═══════════════════════════════════════╩════════════════════════════════════════════════╣
║ Schema: ontobricks (optional — managed_synced sync mode only) ║
║ Lakeflow synced tables — Lakebase mirror of the UC Delta triplestore VIEW ║
║ Created by: first Lakeflow snapshot on a managed_synced domain ║
║ Granted by: manual bootstrap-lakebase-perms.sh -s <sync_schema> (managed_synced) ║
╚══════════════════════════════════════════════════════════════════════════════════════════╝
C. Knowledge Graph Build — Data Flow
UC Source Tables SQL Warehouse Lakebase Postgres
───────────────────── ────────────────────────── ──────────────────────────────────
catalog.schema.A ──┐ ┌─ app_managed (default) ─────────┐
catalog.schema.B ──┼──► R2RML engine │ fetchmany() batches │
catalog.schema.N ──┘ (rr:sqlQuery + joins) │ COPY FROM STDIN │
converts rows → triples │ INSERT ON CONFLICT DO NOTHING │
│ └────────────────────────────────┬─┘
│ triple stream ─────────────────────────────────────►
│ g_<dom>_v<n>_sync
▼ ┌─ managed_synced (optional) ─────┐
CREATE OR REPLACE VIEW │ Lakeflow orchestrates │
triplestore_<domain>_Vn │ Postgres Synced Table API │
(persisted in Unity Catalog) └────────────────────────────────┬─┘
│
reasoning / cohort writes ────────► g_<dom>_v<n>__app
│
┌──────────────────────────────────────────────────┐
│ g_<domain>_v<n> (UNION VIEW — reader-facing) │
│ SELECT * FROM g_<dom>_v<n>_sync │
│ UNION ALL │
│ SELECT * FROM g_<dom>_v<n>__app │
└─────────────────────┬────────────────────────────┘
│
SPARQL query ──► SPARQL→SQL translator ──► SQL Warehouse ──┘ (or direct Lakebase path)
D. Network Ports
Local development (scripts/start.sh / uv run --frozen python run.py):
┌──────────────────────────────────────────────────────────────────────────┐
│ Service Port Transport Notes │
│ ───────────────────── ────── ────────── ────────────────────────── │
│ OntoBricks (FastAPI) 8000 HTTP http://localhost:8000 │
│ MCP server (HTTP mode) 9100 HTTP --http flag, dev/test only │
│ MCP server (stdio) — stdio Cursor / Claude Desktop │
│ Lakebase Postgres 5432 TLS PGHOST/PGPORT from .env │
│ SQL Warehouse 443 HTTPS Databricks connector / SDK │
└──────────────────────────────────────────────────────────────────────────┘
Deployed on Databricks Apps (all outbound — no inbound ports need to be opened):
┌────────────────────────────────────────────────────────────────────────────────────────────┐
│ Service Port Exposure Auth │
│ ───────────────── ───────────────────── ──────────────────────── ──────────────────── │
│ ontobricks-XXX $DATABRICKS_APP_PORT https://<ws>/apps/… Databricks SSO │
│ mcp-ontobricks $DATABRICKS_APP_PORT https://<ws>/apps/… Databricks SSO │
│ Lakebase Postgres 5432 (TLS) PGHOST injected by Apps OAuth JWT (no passwd) │
│ SQL Warehouse 443 (HTTPS) internal via SDK OAuth (SP token) │
│ AI Gateway / Serving 443 (HTTPS) internal via SDK OAuth (SP token) │
│ MLflow Tracking 443 (HTTPS) internal via SDK OAuth (SP token) │
└────────────────────────────────────────────────────────────────────────────────────────────┘
Lakebase password authentication is not used —
LakebaseAuthmints a short-lived JWT viaPOST /api/2.0/postgres/credentialson every connection. NoPGPASSWORDis required or stored.
E. Permission Layers
All four layers must be satisfied before the application is fully functional. They are independent and must each be configured separately.
╔══════════════ Layer 1 — Databricks App-Level (CAN_MANAGE / CAN_USE) ══════════════════╗
║ ║
║ Principal App Level Set by ║
║ ─────────────────── ─────────────────── ────────────── ──────────────────────────── ║
║ Deploying user ontobricks-XXX CAN_MANAGE databricks.yml > permissions ║
║ group: users ontobricks-XXX CAN_USE databricks.yml > permissions ║
║ Main app SP ontobricks-XXX CAN_MANAGE bootstrap-app-permissions.sh ║
║ MCP app SP mcp-ontobricks CAN_MANAGE bootstrap-app-permissions.sh ║
║ MCP app SP ontobricks-XXX CAN_USE bootstrap-app-permissions.sh ║
║ ║
║ ► make bootstrap-perms (idempotent; auto-called by make deploy) ║
╚═════════════════════════════════════════════════════════════════════════════════════════╝
╔══════════════ Layer 2 — Unity Catalog Data-Plane Grants ═══════════════════════════════╗
║ ║
║ Object Privilege Required for ║
║ ─────────────────────────────────── ──────────────────────────────── ──────────────── ║
║ CATALOG <registry_catalog> USE CATALOG all operations ║
║ SCHEMA <registry_catalog>.<sch> USE SCHEMA all operations ║
║ CREATE TABLE triplestore ║
║ CREATE VIEW Knowledge Graph Sync ║
║ VOLUME <cat>.<sch>.<vol> READ VOLUME + WRITE VOLUME artefact storage ║
║ CATALOG <source_catalog> USE CATALOG Data Source picker ║
║ SCHEMA <src_cat>.<src_sch> USE SCHEMA R2RML builds ║
║ TABLE <src_cat>.<src_sch>.<tbl> SELECT per mapping entry ║
║ MODEL SERVICE <cat>.<sch>.<svc> EXECUTE (or inherited Domain Information ║
║ ALL_PRIVILEGES) → AI Gateway picker ║
║ ║
║ ► Grant once as UC admin (see §3 for full SQL snippets) ║
╚═════════════════════════════════════════════════════════════════════════════════════════╝
╔══════════════ Layer 3 — Lakebase Postgres (control + data plane) ══════════════════════╗
║ ║
║ Resource Grant Timing ║
║ ─────────────────────────────────── ────────────────── ───────────────────────────── ║
║ Lakebase project (control-plane) CAN_USE before first deploy ║
║ Schema: ontobricks_registry USAGE + CREATE + after Settings → Initialize ║
║ DML on tables (schema created by the app) ║
║ Schema: ontobricks_graph USAGE + CREATE + after first Knowledge Graph Build ║
║ DML on tables ║
║ Schema: ontobricks (sync, optional) USAGE + CREATE + after first Lakeflow snapshot ║
║ DML on tables ║
║ ║
║ DML = SELECT + INSERT + UPDATE + DELETE on tables ║
║ + USAGE + SELECT + UPDATE on sequences (bigserial PKs) ║
║ + ALTER DEFAULT PRIVILEGES ← covers all future tables automatically ║
║ ║
║ ► make bootstrap-lakebase (idempotent; auto-called by make deploy for dev-lakebase) ║
╚═════════════════════════════════════════════════════════════════════════════════════════╝
╔══════════════ Layer 4 — In-App OntoBricks Roles ═══════════════════════════════════════╗
║ ║
║ Role Source Access ║
║ ──────── ─────────────────────────────── ──────────────────────────────────────────── ║
║ Admin CAN_MANAGE on Databricks App Full access + manage Teams matrix ║
║ Builder domain_permissions table Design + data sources + build / lifecycle ║
║ Editor domain_permissions table Design + import / manage data sources ║
║ Viewer domain_permissions table Read-only (no create / edit / delete) ║
║ (none) not in list Access Denied — redirected to error page ║
║ ║
║ ► Settings → Admin → Teams (only visible to Admins) ║
╚═════════════════════════════════════════════════════════════════════════════════════════╝
Deployment order matters. Layer 1 bootstrap must run before the first user logs in. Layer 2 grants must be in place before any build or sync. Layer 3 grants for
ontobricks_registrymust be applied after the registry schema is initialized (step 14 in the Full Deployment Checklist). Layer 3 grants forontobricks_graphmust be applied after the first Knowledge Graph build creates that schema.
On-Behalf-Of (OBO) data-plane identity — v0.9.0
Since v0.9.0, Unity Catalog data reads run on-behalf-of the signed-in user, not the app service principal. Databricks Apps forward the caller's token on the x-forwarded-access-token header; PermissionMiddleware stamps it onto a request-scoped identity and the data-plane client factory (DatabricksHelpers.get_data_plane_client) mints a user-token Databricks client for every non-build UC read: SPARQL/GraphQL Delta reads, Graph Explorer Delta views, mapping preview / test-query / information_schema browse, Class Action EXECUTE, and virtual-attribute compute.
Implications for Layer 2:
- The SELECT / USE / EXECUTE grants in the table above must now be held by each end user (or a group they belong to), not only the app SP. The app SP still needs them for build (
CREATE VIEW/ triplestore materialisation), which stays on the control-plane principal. - The read path is fail-closed: in App mode a UC data read with no forwarded user token is denied (
AuthorizationError) — it never silently falls back to the SP. - Lakebase Postgres and Neo4j reads keep the service-principal identity (they carry no UC identity). Access to those backends is gated by Team membership: the caller must hold at least the Viewer role on the loaded domain (
assert_domain_graph_read); App admins bypass the Team check. - The MCP server authenticates to the main app with its own M2M principal and forwards the end-user
x-forwarded-email/x-forwarded-access-tokenso the same OBO + Team rules apply to MCP-driven reads. - Local dev is unchanged — OBO and the Team gate are no-ops outside App mode (
is_databricks_app()guards), so a single developer token keeps working.
1. Local Development Setup
Prerequisites
- Python 3.10 or higher
uvpackage manager (recommended) orpip- Git
- Access to a Databricks workspace (Databricks Apps must be enabled)
- Databricks CLI installed (
>= 0.250.0) and authenticated - Lakebase project — must be created via the old instances API (
POST /api/2.0/database/instances), not the Databricks UI "New project" button. The UI usesPOST /api/2.0/postgres/projects, which produces an autoscaling-only project that is incompatible with the Synced Tables API (POST /api/2.0/database/synced_tables) used by the Knowledge Graph build. Usescripts/bootstrap/setup-lakebase.shto create the project correctly (see §2 prerequisites below). psql(libpq client) onPATHforscripts/bootstrap/lakebase-perms.sh(brew install libpq && brew link --force libpqon macOS).
Installation
# Clone the repository
git clone <repository-url>
cd OntoBricks
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create virtual environment and install dependencies
# `--extra lakebase` is required since v0.4.0 — the registry runs on Lakebase Postgres.
uv venv
source .venv/bin/activate
uv sync --frozen --extra lakebaseEnvironment Variables
Create a .env file from the example:
cp .env.example .envEdit .env with your values:
# Required
DATABRICKS_HOST=https://your-workspace.cloud.databricks.com
DATABRICKS_TOKEN=your-personal-access-token
DATABRICKS_SQL_WAREHOUSE_ID=your-warehouse-id
# Registry / triplestore — UC namespace (volume must already exist)
REGISTRY_CATALOG=<your-catalog>
REGISTRY_SCHEMA=<your-schema>
REGISTRY_VOLUME=OntoBricksRegistry
# Lakebase (required since v0.4.0 — semantic local-dev coordinates)
LAKEBASE_PROJECT=ontobricks-app # Autoscaling project name
LAKEBASE_BRANCH=develop # Branch to connect to
LAKEBASE_DATABASE=ontobricks_registry # Postgres database (datname)
LAKEBASE_SCHEMA=ontobricks_registry # Postgres schema for the registry
PGUSER=you@example.com # Your Databricks email locally; SP id in Apps
# PGHOST / PGPORT / PGDATABASE are auto-injected by the Apps platform — do not set here
# MLflow — persist agent traces to your workspace (recommended)
MLFLOW_TRACKING_URI=databricks
# Neo4j (only for domains whose graph backend is "neo4j") — the password is
# resolved live from a Databricks secret scope/key picked in Settings → Back
# end → Neo4j (see docs/pr47-neo4j-demo/secret-configuration.md);
# NEO4J_PASSWORD below is only read for the legacy `auth_method: "basic"`
# configs still bound to an Apps secret resource.
# NEO4J_PASSWORD=<bolt-password> # legacy — in Apps, via a secret resource
PGPASSWORDis intentionally not in this list.LakebaseAuthmints a short-lived JWT viaPOST /api/2.0/postgres/credentialson every connection.
Graph backend selection (No Backend / Lakebase / Delta / Neo4j)
The Graph DB engine is chosen per domain (graph_backend: none, lakebase, databricks, or neo4j) under Domain → Information → Knowledge Graph; none creates an ontology-only domain and requires no graph infrastructure. Connection knobs live under Settings → Back end. Lakebase and the Delta (databricks) engine need no extra credentials beyond the Databricks/Lakebase config above. The Neo4j engine (Aura or self-hosted, Bolt protocol) always asks for the Bolt username directly and resolves the password live from a Databricks secret — there is no plain-text password field, in local dev or in the deployed app:
- Pick the Secret scope and Secret name from the dropdowns in Settings → Back end → Neo4j (populated live via the Databricks Secrets API). Deploy does not create or bind that secret (Neo4j is optional).
- The app's own identity (SP OAuth in Apps, PAT/CLI profile locally) needs
READon that scope — seedocs/pr47-neo4j-demo/secret-configuration.mdfor the one-timedatabricks secrets put-aclsetup. - Legacy configs still bound to the
neo4j-passwordApps secret resource (auth_method: "basic"+NEO4J_PASSWORDenv var) keep working, but that path is no longer offered in the Settings UI — see the same doc to migrate.
Run Locally
scripts/start.sh
# Or directly: uv run --frozen python run.py
# Open http://localhost:8000Running Tests
uv run --frozen pytest -q -m "not scenario" # routine full suite
uv run --frozen pytest --cov=back --cov=front --cov=shared --cov=api --cov=agents --cov-report=html
make scenario-campaign # explicit live scenario journey2. Databricks Apps Deployment (DAB)
Deployment uses Databricks Asset Bundles to deploy both the main app and the MCP server declaratively from a single databricks.yml at the project root.
Naming in this guide: ontobricks-XXX stands for whatever main app name you set under resources.apps.ontobricks_dev_app in databricks.yml (replace it in every command and UI path). The MCP app name in this bundle is typically mcp-ontobricks.
Prerequisites
| Requirement | Details |
|---|---|
| Databricks CLI | >= 0.250.0 — check with databricks -v |
| Authenticated CLI | databricks auth login --host https://<workspace> |
| SQL Warehouse | A running SQL Warehouse in the workspace |
| Apps feature | Databricks Apps must be enabled on the workspace |
| Unity Catalog | A catalog, schema, and volume for the project registry |
| Lakebase project | Must be provisioned via scripts/bootstrap/setup-lakebase.sh — do not use the Databricks UI "New project" button (calls wrong API, incompatible with Synced Tables). The script uses POST /api/2.0/database/instances and prints the db-… resource id. Set DEFAULT_LAKEBASE_PROJECT / DEFAULT_LAKEBASE_DATABASE in scripts/deploy.config.sh; deploy.sh resolves the segment (optional override: LAKEBASE_DATABASE_RESOURCE_SEGMENT). See §2a below. |
psql on PATH |
Required by scripts/bootstrap/lakebase-perms.sh (brew install libpq && brew link --force libpq on macOS). |
| UC grants for the app SP | The app runs as a service principal. See §3 Unity Catalog Permissions for the Service Principal for the exact grants required on the registry catalog/schema, the registry volume, and your source tables. |
| Lakebase grants for the app SP | CAN_USE on the Lakebase instance + USAGE/DML on the registry / graph / sync schemas. Bootstrap with scripts/bootstrap/lakebase-perms.sh (make bootstrap-lakebase) — scripts/deploy.sh runs it automatically on the dev-lakebase target. |
Step 0 — Create the Lakebase project (first-time only)
Critical: The Databricks UI "New project" button calls
POST /api/2.0/postgres/projectswhich creates an autoscaling-only project. That API is incompatible with the Synced Tables API (POST /api/2.0/database/synced_tables) used by the Knowledge Graph build. You must usescripts/bootstrap/setup-lakebase.shinstead.
# Create the project (once per workspace):
./scripts/bootstrap/setup-lakebase.sh --name ontobricks-demo --capacity CU_2
# The script prints the db-… resource id at the end. Set
# DEFAULT_LAKEBASE_PROJECT / DEFAULT_LAKEBASE_DATABASE in deploy.config.sh;
# deploy.sh resolves the segment (optional: LAKEBASE_DATABASE_RESOURCE_SEGMENT).The script:
- Creates the instance via
POST /api/2.0/database/instances(synced-tables-compatible). - Waits for
AVAILABLE. - Creates the Postgres database (
ontobricks_demoby default). - Prints the
db-…segment (informational — usually auto-resolved at deploy).
Options:
| Flag | Default | Description |
|---|---|---|
--name |
ontobricks-demo |
Project name |
--capacity |
CU_2 |
Compute: CU_1, CU_2, CU_4 |
--branch |
production |
Initial branch |
--database |
ontobricks_demo |
Postgres database name |
--profile |
DEFAULT |
Databricks CLI profile |
--dry-run |
— | Print plan without executing |
Step 1 — Authenticate
databricks auth login --host https://<workspace>.cloud.databricks.com
# Verify
databricks current-user meStep 2 — Customize scripts/deploy.config.sh (single source of truth)
Important. app.yaml is generated at deploy time from app.yaml.template + scripts/deploy.config.sh by scripts/_internal/_render-app-yaml.py (called from scripts/deploy.sh). The generated file is .gitignored. Do not edit app.yaml by hand — edit scripts/deploy.config.sh instead.
Edit the workspace-specific defaults in scripts/deploy.config.sh:
| Variable | Maps to | Description |
|---|---|---|
DEFAULT_DATABRICKS_PROFILE |
DATABRICKS_CONFIG_PROFILE (CLI env) |
Databricks CLI profile from databricks auth profiles. Empty = CLI default. |
DEFAULT_INSTANCE_ID |
Derives APP_NAME / MCP_APP_NAME / DAB_TARGET |
Single knob for a deploy instance (e.g. 07x → ontobricks-07x, target dev-lakebase-07x). |
DEFAULT_APP_NAME |
databricks.yml > var.app_name and DATABRICKS_APP_NAME at runtime |
Usually derived as ontobricks-${DEFAULT_INSTANCE_ID}; override only if you must. |
DEFAULT_MCP_APP_NAME |
databricks.yml > var.mcp_app_name |
Deployed name of the MCP companion (must start with mcp-). |
DEFAULT_DAB_TARGET |
databricks bundle deploy -t <target> |
Auto: dev-lakebase-<INSTANCE_ID>. Force dev-lakebase only when upgrading a pre-INSTANCE_ID (0.6.x) deploy in place — see Upgrade Notes in releases/ReleaseNotes_V0.7.0.md and In-place app upgrade in the deployment checklist below. |
DEFAULT_WAREHOUSE_ID |
app.yaml > DATABRICKS_SQL_WAREHOUSE_ID_DEFAULT + the sql-warehouse bundle resource |
SQL Warehouses → your warehouse → Connection details. |
DEFAULT_REGISTRY_CATALOG / _SCHEMA / _VOLUME |
Bundle volume resource (uc_securable: <cat>.<schema>.<volume>) |
UC namespace that hosts the binary-artefact volume + the triplestore VIEW. |
DEFAULT_LAKEBASE_PROJECT |
databricks.yml > var.lakebase_project |
Autoscaling project id (final segment of projects/<id>). |
DEFAULT_LAKEBASE_BRANCH |
databricks.yml > var.lakebase_branch |
Branch id (e.g. production). |
DEFAULT_LAKEBASE_DATABASE |
Used by deploy.sh to resolve var.lakebase_database_resource_segment |
Postgres datname (status.postgres_database from list-databases). Do not paste the db-… id here. |
LAKEBASE_DATABASE_RESOURCE_SEGMENT |
databricks.yml > var.lakebase_database_resource_segment |
Optional env override for the db-… resource id. When unset, deploy.sh resolves it from DEFAULT_LAKEBASE_DATABASE via the Postgres API. |
DEFAULT_LAKEBASE_SCHEMA |
databricks.yml > var.lakebase_registry_schema + LAKEBASE_SCHEMA at runtime |
Postgres schema for the registry (e.g. ontobricks_registry). |
DEFAULT_APP_TRIPLESTORE_TABLE |
app.yaml > DATABRICKS_TRIPLESTORE_TABLE |
Fully-qualified catalog.schema.table fallback for MCP/session-less paths. |
DEFAULT_APP_MLFLOW_TRACKING_URI |
app.yaml > MLFLOW_TRACKING_URI |
databricks (persists traces to the workspace) or empty for local-only. |
Each DEFAULT_* is consumed via export FOO="${FOO:-$DEFAULT_FOO}", so you can override any value for a single run without editing the file:
WAREHOUSE_ID=abc123def456 make deploy
LAKEBASE_PROJECT=other-project LAKEBASE_BRANCH=staging make deployscripts/_internal/_render-app-yaml.py substitutes ${APP_*} placeholders in app.yaml.template into the generated app.yaml.
Step 3 — databricks.yml (bundle variables)
databricks.yml declares the bundle resources and the variables: contract, but the values come from scripts/deploy.config.sh — scripts/deploy.sh passes each as --var=key=value so the YAML defaults are only used by databricks bundle validate outside the deploy script. The variables are:
| Variable | Purpose |
|---|---|
app_name / mcp_app_name |
Deployed app names (final URL segments). |
warehouse_id |
SQL Warehouse ID for the sql-warehouse resource. |
registry_catalog / registry_schema / registry_volume |
UC triple for the uc_securable volume resource. |
lakebase_project / lakebase_branch |
Lakebase Autoscaling project + branch (path segments). |
lakebase_database_resource_segment |
db-… resource id for the Apps postgres.database path (see Step 2). |
lakebase_registry_schema |
Postgres schema mirrored into LAKEBASE_SCHEMA in app.yaml. |
Do not set
lakebase_database_resource_segmentto the schema nameontobricks_registryunless you intentionally bind a dedicated Postgres database whose resource id is that string (rare). The defaultdev-lakebasesetup binds a dedicated Postgres database whosedatnameisontobricks_registry, with registry tables in the schemaontobricks_registry. Older single-DB layouts useddatabricks_postgresasdatnamewith the same schema name inside it — uselist-databasesto see whichdb-…row matches your bind.
Update each app's permissions block in databricks.yml (resources.apps.<app>.permissions — not the top-level bundle permissions:, which only allows CAN_MANAGE / CAN_VIEW / CAN_RUN and rejects CAN_USE). The sandbox already grants the deploying user CAN_MANAGE and the users group CAN_USE via ${workspace.current_user.userName}; adjust only if you need a different ACL:
resources:
apps:
ontobricks_dev_app:
# … name / source_code_path / resources …
permissions:
- level: CAN_MANAGE
user_name: ${workspace.current_user.userName}
- level: CAN_USE
group_name: users
mcp_ontobricks_app:
permissions:
- level: CAN_MANAGE
user_name: ${workspace.current_user.userName}
- level: CAN_USE
group_name: usersMCP
ONTOBRICKS_URL.src/mcp-server/app.yamlstill holds the main app URL the MCP companion calls back into (ONTOBRICKS_URL). This is the onlyapp.yamlyou edit by hand. Update it after the first deploy withdatabricks apps get <main-app> -o json | python3 -c "import sys,json; print(json.load(sys.stdin)['url'])".
Note — the deployed app name no longer needs an explicit
ONTOBRICKS_APP_NAMEenv var. The runtime auto-detects it from the Databricks-Apps-injectedDATABRICKS_APP_NAME. SetONTOBRICKS_APP_NAMEonly as an explicit override (e.g. in.envfor local development).
The REGISTRY_CATALOG, REGISTRY_SCHEMA, and REGISTRY_VOLUME static variables in app.yaml are only used for local development / MCP fallback. In a deployed app the volume resource binding injects REGISTRY_VOLUME_PATH automatically.
Step 4 — Validate the bundle
# Volume-only target (no Lakebase postgres resource in the bundle)
databricks bundle validate -t dev
# Default sandbox with Lakebase Autoscaling postgres binding
databricks bundle validate -t dev-lakebaseThis checks the bundle configuration without deploying. Fix any errors before proceeding.
Step 5 — Deploy
This repository’s scripts/deploy.sh defaults to dev-lakebase (Volume + Lakebase postgres binding). Use -t dev for Volume-only (no postgres resource).
# Deploy both apps (main + MCP) with Lakebase binding — recommended
databricks bundle deploy -t dev-lakebase
# Or use the convenience script (validate + deploy + start main app)
scripts/deploy.sh
# Volume-only registry backend (no Lakebase bind)
scripts/deploy.sh -t devIf the apps already exist in the workspace (e.g., from a previous manual deploy), bind bundle resources to them once (resource keys and app names must match databricks.yml):
databricks bundle deployment bind ontobricks_dev_app ontobricks-XXX -t dev-lakebase --auto-approve
databricks bundle deployment bind mcp_ontobricks_app mcp-ontobricks -t dev-lakebase --auto-approve
databricks bundle deploy -t dev-lakebaseOr run scripts/deploy.sh --bind -t dev-lakebase to bind the main app only (see script header for MCP bind if you extend the script).
Step 5b — Lakebase schema grants (target dev-lakebase only)
Databricks does not auto-grant the app service principal anything on Lakebase Postgres objects, even when the postgres resource binding is wired correctly. scripts/deploy.sh calls scripts/bootstrap/lakebase-perms.sh automatically on the dev-lakebase target (you can re-run it manually any time — it is idempotent).
The deploy script is registry-scoped: it bootstraps only the registry schema. The graph DB is configured in-app (Settings → Graph DB) and may live in a different Lakebase project, so its grant is handled by the in-app "Create graph DB" flow or a manual bootstrap-lakebase-perms.sh run.
In-app alternative (no
psqlneeded). The registry schema grants are now also applied from inside the app: Settings → Registry → Initialize auto-runs them right after creating the schema (the app SP owns the schema, so it canGRANTto the MCP SP), and the Repair permissions button on the same panel re-applies them on demand (idempotent — useful after a rebind/redeploy drops the schema GRANTs). The control-plane grants (projectCAN_USE, UC catalogALL_PRIVILEGES) are best-effort in-app and degrade to a warning when the SP lacks manage rights — those still rely on the script/CLI. Sobootstrap-lakebase-perms.sh(and itspsqldependency) remains the documented path for the full set, but the everyday schema GRANTs no longer require it.
| Schema | When to bootstrap | Who runs it |
|---|---|---|
Registry (ontobricks_registry) |
After make deploy has created the schema |
deploy.sh automatically (LAKEBASE_SCHEMA in deploy.config.sh) |
Graph DB (ontobricks_graph) |
After the first Knowledge Graph Build has created the schema | In-app "Create graph DB" flow, or manual run with the graph project/branch/database |
The script grants:
CAN_USEon the Lakebase database project (control-plane).ALL PRIVILEGESon the UC catalog when-c/--catalogis passed (also control-plane — applied before the schema exists so a first deploy still grants it;deploy.shpasses-c $REGISTRY_CATALOG).USAGE + CREATEon the Postgres schema.SELECT / INSERT / UPDATE / DELETEon every existing table.USAGE / SELECT / UPDATEon every existing sequence (bigserial PKs).- The same set via
ALTER DEFAULT PRIVILEGESso future tables inherit.
Naming: pass the real MCP app name (
mcp-${APP_NAME}, e.g.mcp-ontobricks-07x), not the baremcp-ontobricksstring. Instance deploys derive both names fromDEFAULT_INSTANCE_IDinscripts/deploy.config.sh.
Manual invocation:
# Registry schema (use your APP_NAME / MCP_APP_NAME from deploy.config.sh)
scripts/bootstrap/lakebase-perms.sh \
-i "<lakebase_project>" \
-b "<lakebase_branch>" \
-d ontobricks_registry \
-s ontobricks_registry \
-c "<registry_catalog>" \
-a ontobricks-XXX \
-a mcp-ontobricks-XXX
# Graph schema (run after first Build — use the graph DB's own
# project/branch/database, which MAY differ from the registry)
scripts/bootstrap/lakebase-perms.sh \
-i "<graph_project>" -b "<graph_branch>" \
-d "<graph_database>" -s ontobricks_graph \
-a ontobricks-XXX -a mcp-ontobricks-XXXThe registry grant uses LAKEBASE_PROJECT / LAKEBASE_BRANCH / LAKEBASE_REGISTRY_DATABASE from deploy.config.sh; only the -s schema name changes if you grant additional schemas in the same database.
If your Lakebase instance still uses the shared default database databricks_postgres (older single-DB layouts) with the registry schema ontobricks_registry inside it, pass -d databricks_postgres and set LAKEBASE_REGISTRY_DATABASE=databricks_postgres in scripts/deploy.config.sh.
Step 6 — Start the apps
# Start the main UI app (resource key ontobricks_dev_app)
databricks bundle run ontobricks_dev_app -t dev-lakebase
# Start the MCP server (resource key mcp_ontobricks_app)
databricks bundle run mcp_ontobricks_app -t dev-lakebasescripts/deploy.sh (without --no-run) starts only the main app (ontobricks-XXX). Start the MCP app with databricks bundle run mcp_ontobricks_app -t dev-lakebase, or use make deploy then run the MCP command separately.
Step 7 — Bind resources (first deploy only)
After the first deployment, bind the app resources in the Databricks workspace UI:
- Go to Compute > Apps and open your main app (placeholder
ontobricks-XXX— same string asresources.apps.ontobricks_dev_app.nameindatabricks.yml). - Click Resources
- Bind
sql-warehouseto a running SQL Warehouse - Bind
volumeto the Unity Catalog Volume for the project registry (e.g.,your_catalog.your_schema.registry— matchregistry_*variables indatabricks.yml) - Repeat for
mcp-ontobricks(same warehouse and volume) - For
dev-lakebase, confirm the postgres resource is bound to the Lakebase database you configured (no extra UI step if deploy succeeded). - Verify both apps show status Running
Note: Resource bindings persist across redeployments — you only need to do this once per workspace. Once the
sql-warehouseandvolumeresources are bound, the corresponding controls in the Settings page are locked. To change them, update the resource bindings in the Apps UI and restart the app.
Step 8 — Registry initialize (upgrade / repair)
make deploy already creates missing UC/Lakebase resources and runs LakebaseRegistryStore.initialize(). A first install does not need Settings → Registry → Initialize.
Use Initialize in the app as an upgrade/repair path (new columns, re-pin the UC triplet, or Repair permissions after a rebind). Control-plane re-grants (CAN_USE on the Lakebase project, UC ALL_PRIVILEGES on the catalog) are best-effort in-app: the app SP usually lacks CAN_MANAGE / catalog MANAGE. If UC privileges are missing, re-run scripts/bootstrap/lakebase-perms.sh with -c as a workspace admin.
Step 9 — Verify
# Check app status (names must match databricks.yml resources.apps.*.name)
databricks apps get ontobricks-XXX
databricks apps get mcp-ontobricks
# Or via bundle
databricks bundle summary -t dev-lakebasescripts/deploy.sh Reference
The convenience script wraps databricks bundle validate, databricks bundle deploy, optional bundle deployment bind, bundle run (main app only), bootstrap-app-permissions.sh, and bootstrap-lakebase-perms.sh (when target is dev-lakebase):
scripts/deploy.sh # default: -t dev-lakebase — validate + deploy + run ontobricks-XXX
scripts/deploy.sh -t dev # Volume-only target (no Lakebase postgres bind)
scripts/deploy.sh -t dev-lakebase # explicit Lakebase target (same as default)
scripts/deploy.sh --no-run # deploy artifacts without starting the app
scripts/deploy.sh --bind # bind main app resource key → existing app name, then deployapp.yaml Configuration — Full Reference
Generated file — do not edit
app.yamldirectly. It is rendered at deploy time fromapp.yaml.template+scripts/deploy.config.shbyscripts/_internal/_render-app-yaml.py. Edit the config, then runmake deploy(ormake render-app-yamlto only re-render).
The rendered app.yaml controls the Databricks App runtime. Here is every variable explained:
# Command to start the app — uv resolves dependencies from pyproject.toml.
# `--extra lakebase` installs psycopg[binary] + psycopg-pool so the
# Lakebase backend works on every target (Volume-only deploys carry a
# ~10MB unused wheel but the Lakebase code paths stay gated by
# LakebaseAuth.is_available).
command:
- "uv"
- "run"
- "--extra"
- "lakebase"
- "python"
- "run.py"
env:
# ── SQL Warehouse ──────────────────────────────────────────────
# Injected from the sql-warehouse resource binding (databricks.yml).
- name: DATABRICKS_SQL_WAREHOUSE_ID
valueFrom: sql-warehouse
# Static fallback warehouse ID for MCP / session-less API calls.
- name: DATABRICKS_SQL_WAREHOUSE_ID_DEFAULT
value: "${APP_SQL_WAREHOUSE_FALLBACK}"
# ── Triple store fallback (Delta) ──────────────────────────────
- name: DATABRICKS_TRIPLESTORE_TABLE
value: "${APP_TRIPLESTORE_TABLE}"
# ── Project Registry ───────────────────────────────────────────
# Injected from the volume resource binding (uc_securable in
# databricks.yml). The path looks like /Volumes/<cat>/<schema>/<vol>.
- name: REGISTRY_VOLUME_PATH
valueFrom: volume
# Static fallbacks — used by MCP when no volume resource is bound.
- name: REGISTRY_CATALOG
value: "${APP_REGISTRY_CATALOG}"
- name: REGISTRY_SCHEMA
value: "${APP_REGISTRY_SCHEMA}"
- name: REGISTRY_VOLUME
value: "${APP_REGISTRY_VOLUME}"
# ── Lakebase ───────────────────────────────────────────────────
# On dev-lakebase the DAB binds a `database` resource. The Apps
# runtime then auto-injects PGHOST / PGPORT / PGDATABASE / PGUSER /
# PGAPPNAME / PGSSLMODE — no explicit valueFrom mapping needed.
# The Postgres password is minted at runtime by LakebaseAuth via
# POST /api/2.0/postgres/credentials.
# LAKEBASE_* vars are informational in the deployed app (used to
# display connection details in Settings → Registry) and as fallback
# when PGHOST is absent (local dev without a bound database resource).
- name: LAKEBASE_SCHEMA
value: "${APP_LAKEBASE_SCHEMA}"
- name: LAKEBASE_PROJECT
value: "${APP_LAKEBASE_PROJECT}"
- name: LAKEBASE_DATABASE
value: "${APP_LAKEBASE_DATABASE}"
- name: LAKEBASE_BRANCH
value: "${APP_LAKEBASE_BRANCH}"
# ── MLflow ─────────────────────────────────────────────────────
- name: MLFLOW_TRACKING_URI
value: "${APP_MLFLOW_TRACKING_URI}"
# ── Resources ──────────────────────────────────────────────────
# Declared here for local validation, but the BOUND resources at
# runtime come from databricks.yml (which uses uc_securable for the
# volume so the bundle owns the UC ACL).
resources:
- name: sql-warehouse
description: "SQL Warehouse for executing queries and metadata operations"
sql_warehouse:
permission: CAN_USE
- name: volume
description: "Unity Catalog Volume for the OntoBricks domain registry"
volume:
permission: CAN_READ_WRITEResource-Locked Settings
When OntoBricks detects that it is running as a Databricks App with resource bindings, the Settings page automatically locks the affected controls:
| Resource | What is locked | How to change |
|---|---|---|
sql-warehouse |
Databricks-section warehouse dropdown + refresh button; the Lakehouse Build selector and transport toggle remain editable for admins | Rebind the default sql-warehouse resource in Compute > Apps > Resources, or save an admin override under Settings → Lakehouse → SQL Warehouse |
volume |
Registry Change button | Rebind the volume resource in Compute > Apps > Resources |
The Initialize button remains available when the volume resource is bound but the registry has not been initialized yet (no .registry marker). This allows first-time setup without unlocking the UI.
The bound build warehouse must be a classic or serverless SQL warehouse, not Lakehouse//RT: Knowledge Graph builds execute CREATE VIEW, CTAS, and writes. Configure Lakehouse//RT separately under Settings → Lakehouse → SQL Warehouse when low-latency graph reads are required.
That panel always shows both roles. Query is disabled and mirrors Build until Use Lakehouse//RT for queries is enabled. RT mode requires a distinct Query warehouse; disabling RT and applying removes the override.
In local development mode (no Databricks App resources), all Settings controls remain fully editable.
3. Unity Catalog Permissions for the Service Principal
Databricks Apps run as a service principal (SP) created automatically when the app is deployed. The app's workspace bindings (sql-warehouse, volume) only cover the compute and the registry volume — they do not grant Unity Catalog privileges on the catalogs, schemas, or tables OntoBricks reads from and writes to. These grants are your responsibility and must be done once per workspace.
You can look up the app's SP ID with:
databricks apps get ontobricks-XXX -o json \
| python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('service_principal_client_id'))"Throughout this guide, replace ontobricks-XXX with your workspace’s actual main app name from databricks.yml.
Throughout this section that identifier is written as <app-sp> (it is a UUID / client-id, not an email).
Privilege mental model. In Unity Catalog, to reference any object you need
USE CATALOGon its catalog andUSE SCHEMAon its schema. To read table/view data you needSELECT. To create new tables or views in a schema you need schema-levelCREATE TABLE/CREATE VIEW. To modify or replace an object that already exists (includingCREATE OR REPLACEover an existing object) you must own it or holdMANAGEon it. Volumes are separate: files under/Volumes/...needREAD VOLUMEandWRITE VOLUME.ALL PRIVILEGESis a convenient shorthand during onboarding but you should narrow it down before production.
3.1 — What OntoBricks actually does in UC
The main app's service principal performs the following operations at runtime. Every one of them needs a UC grant.
| # | Operation | Target | UC privilege required |
|---|---|---|---|
| 1 | SHOW CATALOGS, SHOW SCHEMAS, SHOW TABLES, DESCRIBE, SHOW VOLUMES, information_schema.tables lookups (Data Source picker) |
Source catalogs + registry catalog | USE CATALOG + USE SCHEMA + SELECT on browsed tables |
| 2 | SELECT on source tables referenced by R2RML sql_query entries (VIEW creation + build) |
Each source table/view | SELECT |
| 3 | CREATE OR REPLACE VIEW <registry_catalog>.<registry_schema>.triplestore_<domain>_V<n> (Knowledge Graph Sync) |
Registry schema | Schema CREATE VIEW. If an object with the same name already exists from a previous build, additionally MANAGE on it or SP ownership. |
| 4 | SELECT subject, predicate, object FROM <triplestore VIEW> (SPARQL + Lakebase Graph DB population) |
The triplestore VIEW | SELECT (inherited by the SP as owner once it created the VIEW in step 3). |
| 5 | CREATE TABLE IF NOT EXISTS <table>(subject STRING, predicate STRING, object STRING) USING DELTA, DELETE FROM, INSERT INTO on the optional DATABRICKS_TRIPLESTORE_TABLE fallback (reasoning materialisation, MCP session-less calls) |
Fallback triple-store table | Schema CREATE TABLE. If the table pre-exists, MODIFY to DELETE/INSERT + SELECT. |
| 6 | File I/O under /Volumes/<registry_catalog>/<registry_schema>/<registry_volume>/ (projects, domains, history log, registry artefacts) |
Registry volume | READ VOLUME + WRITE VOLUME. |
| 7 | POST /api/2.1/unity-catalog/volumes — only triggered from Settings → Registry → Initialize when the volume does not yet exist |
Registry schema | Schema CREATE VOLUME (skip if you create the volume manually up front). |
| 8 | CREATE SCHEMA IF NOT EXISTS, CREATE TABLE, INSERT … COPY FROM STDIN, SELECT, DELETE on the App-bound Lakebase Postgres database (Graph DB engine + optionally registry hybrid backend) |
Lakebase database | Lakebase user role with privileges on the configured schema (default ontobricks_graph). Authentication uses the App-injected OAuth token. |
| 9 | List and invoke Unity AI Gateway model services selected in Domain Information → AI (Ontology Assistant, Wizard, Auto-Map, Graph Chat, …) | Each Gateway model service (and its catalog/schema) | USE CATALOG + USE SCHEMA + EXECUTE. An inherited effective ALL_PRIVILEGES grant also counts as executable. Legacy Model Serving endpoints use Serving permissions, not this UC chain. |
All the above run through the SQL Warehouse bound to the app (sql-warehouse resource) on behalf of the app SP. The CAN_USE grant on the warehouse covers compute access; data access is controlled by UC.
3.2 — Registry catalog/schema grants (minimum viable set)
Run these SQL statements once as a workspace admin (or anyone with MANAGE on the catalog/schema), substituting your bundle values from databricks.yml:
-- The catalog the registry lives in
GRANT USE CATALOG ON CATALOG `<registry_catalog>` TO `<app-sp>`;
-- The schema that holds the triplestore VIEW, snapshot tables, and the registry Volume
GRANT USE SCHEMA ON SCHEMA `<registry_catalog>`.`<registry_schema>` TO `<app-sp>`;
GRANT CREATE TABLE ON SCHEMA `<registry_catalog>`.`<registry_schema>` TO `<app-sp>`;
GRANT CREATE VIEW ON SCHEMA `<registry_catalog>`.`<registry_schema>` TO `<app-sp>`;
-- Registry Volume (files: projects, domains, history, registry artefacts).
-- The `volume` resource binding only grants compute reach-through; UC ACLs still apply.
GRANT READ VOLUME ON VOLUME `<registry_catalog>`.`<registry_schema>`.`<registry_volume>` TO `<app-sp>`;
GRANT WRITE VOLUME ON VOLUME `<registry_catalog>`.`<registry_schema>`.`<registry_volume>` TO `<app-sp>`;
-- Optional — only if you want the Settings UI to be able to create the
-- registry volume itself on first run (otherwise create it once as admin).
GRANT CREATE VOLUME ON SCHEMA `<registry_catalog>`.`<registry_schema>` TO `<app-sp>`;Alternatively — shorter, broader, and fine for a dev workspace:
GRANT USE CATALOG ON CATALOG `<registry_catalog>` TO `<app-sp>`;
GRANT ALL PRIVILEGES ON SCHEMA `<registry_catalog>`.`<registry_schema>` TO `<app-sp>`;Prefer the explicit list above for a production workspace because ALL PRIVILEGES also implies MANAGE, which is broader than what the app needs day to day.
Lakebase / Initialize note (issue #137): the in-app Initialize / Repair permissions flow also tries to grant catalog-level
ALL_PRIVILEGESto the app SP so synced tables are readable. That call runs as the app SP, which cannot succeed unless the SP already has catalogMANAGE. Prefer grantingALL PRIVILEGESto the SP from a human/admin principal viascripts/bootstrap/lakebase-perms.sh -c <catalog>(or the SQL below) — do not elevate the app SP toCAN_MANAGE/ catalogMANAGEjust to silence the Initialize warning.GRANT ALL PRIVILEGES ON CATALOG `<registry_catalog>` TO `<app-sp>`; -- repeat for the MCP app SP GRANT ALL PRIVILEGES ON CATALOG `<registry_catalog>` TO `<mcp-sp>`;
3.3 — Source data grants (customer tables/views)
For every table or view referenced in an R2RML mapping (i.e. anything that appears in the Data Assets tab of a domain), the app SP needs to read the data:
GRANT USE CATALOG ON CATALOG `<source_catalog>` TO `<app-sp>`;
GRANT USE SCHEMA ON SCHEMA `<source_catalog>`.`<source_schema>` TO `<app-sp>`;
-- Per-object is tightest:
GRANT SELECT ON TABLE `<source_catalog>`.`<source_schema>`.`<table>` TO `<app-sp>`;
-- Or grant schema-wide if you trust the SP with the whole schema:
-- GRANT SELECT ON SCHEMA `<source_catalog>`.`<source_schema>` TO `<app-sp>`;If any mapping sql_query joins tables from multiple schemas or catalogs, repeat the USE CATALOG / USE SCHEMA / SELECT chain for each. The VIEW creation in step 3 will fail with TABLE_OR_VIEW_NOT_FOUND or PERMISSION_DENIED if one is missing.
3.3.1 — AI Gateway model services
Custom Unity AI Gateway services selected in Domain Information → AI must be executable by the app service principal. Discovery lists a service only when effective privileges include EXECUTE or inherited ALL_PRIVILEGES (GET /api/2.1/unity-catalog/effective-permissions/model_service/{name}).
Grant USE CATALOG and USE SCHEMA on the catalog and schema that host the service, plus EXECUTE on the model service (or inherit ALL_PRIVILEGES from the catalog). system.ai.* Foundation Model Gateway services follow the same chain when they appear in the picker. Legacy Model Serving endpoints are listed separately and do not use this UC grant.
3.4 — What you do not need to grant
MODIFYon source tables — the app only reads them.MANAGEon the registry schema —CREATE TABLE+CREATE VIEWare sufficient because the SP automatically owns the objects it creates.MANAGEon the registry catalog — not required unless you want the SP toDROP CATALOG/ALTER CATALOG, which OntoBricks never does.
3.5 — Known pitfall: stale object blocking CREATE OR REPLACE VIEW
If a build previously materialised the triplestore as a TABLE (legacy code path or a manual CTAS in SQL Editor), the next Sync will try to run CREATE OR REPLACE VIEW over the same name. Databricks refuses this because:
CREATE OR REPLACE VIEWcannot convert an existing TABLE to a VIEW, even for the owner.- Even if it could, the SP would need
MANAGEon that pre-existing object.
The user-facing error surfaces as:
Sync failed: Failed to create VIEW: PERMISSION_DENIED: User does not have MANAGE on Table '<cat>.<schema>.triplestore_<domain>_v<n>'.
Fix (once): drop the stale object yourself, then re-run Sync:
DROP TABLE IF EXISTS `<registry_catalog>`.`<registry_schema>`.`triplestore_<domain>_v<n>`;Once dropped, the app SP recreates the object as a VIEW and owns it from then on.
Settings → Lakehouse Delete must also drop graph-index companions (_adj_out, _adj_in, _entity_search, _entity_search_asserted, _props). Those tables are grouped with the domain gateway view; a purge that leaves them behind will show leftover triplestore_<domain>_v<n>_* objects in Catalog.
3.5a — Known pitfall: app SP not authorized on the SQL warehouse
Knowledge Graph builds connect as the app service principal, not the signed-in user. After switching the bound warehouse (for example an empty DEFAULT_WAREHOUSE_ID resolving to Serverless Starter), DAB may not replay CAN_USE onto the new endpoint. The build fails in ~200ms with:
PERMISSION_DENIED: <app-sp> is not authorized to use this SQL Endpoint.
make bootstrap-perms (also run by make deploy) grants CAN_USE on the warehouse bound to the app. To repair an existing sandbox without redeploying:
databricks warehouses update-permissions <warehouse_id> \
--json '{"access_control_list":[{"service_principal_name":"<app-sp>","permission_level":"CAN_USE"}]}'3.6 — Granting when the SP ID is unknown yet
If databricks apps get reports the SP client-id as None (app not fully provisioned), bind it by email-alias instead. Apps expose a dedicated SP user with the form <app-name>@<account-id>.iam.databricks.com, visible under Admin → Service principals after the first deploy. You can grant against that principal with the same SQL, substituting its identifier in the TO clause.
3.7 — Quick verification
Once grants are in place, you can verify from any SQL editor or notebook authenticated as the app SP (or by running a build in the app and watching the logs):
-- Should succeed (list registry schema objects)
SHOW TABLES IN `<registry_catalog>`.`<registry_schema>`;
SHOW VOLUMES IN `<registry_catalog>`.`<registry_schema>`;
-- Should return the current SP's privileges on the schema
SHOW GRANTS `<app-sp>` ON SCHEMA `<registry_catalog>`.`<registry_schema>`;If a user reports a sync failure, the app now surfaces the underlying Databricks error in the task status (PERMISSION_DENIED, TABLE_OR_VIEW_NOT_FOUND, unresolved column, etc.). The full traceback is always in the app logs.
4. Permission Management
OntoBricks includes a built-in permission system that controls who can access the app and what they can do. Permissions are managed in Settings > Permissions and are only active when running as a Databricks App (local development has no restrictions).
How It Works
| Role | Access |
|---|---|
| Admin | Full access + can manage the permission list. Determined by CAN_MANAGE on the Databricks App. |
| Builder | Full domain design access, including importing and managing data sources, plus build and lifecycle operations. |
| Editor | Full access to all features (read + write). |
| Viewer | Read-only access (cannot create, edit, or delete). |
| No role | Blocked entirely (redirect to Access Denied page). |
When no permissions are configured yet, only users with CAN_MANAGE on the Databricks App have access. Everyone else is blocked until an admin adds them via the Permissions tab.
Editors and Builders can browse Unity Catalog catalogs and schemas from the domain's Data Assets panel and can import, update, or remove its tables. They do not need CAN_MANAGE for these domain operations. Shared application configuration, including SQL Warehouse selection, remains admin-only.
Users and Groups
Every grant works the same whether it targets a user or a Databricks group — a group grant is inherited by each of its members exactly as an individual grant would be:
- A group with CAN_MANAGE on the App makes every member an OntoBricks Admin. Because workspace administrators hold
CAN_MANAGEthrough the built-inadminsgroup, they are Admins in OntoBricks too. - A group with CAN_USE on the App lets every member into the app. The role assigned to that group in Settings > Admin > Teams (Viewer / Editor / Builder) is the role each member gets on that domain. A group with no row on a domain gives its members no access to it.
- When several grants match one person — a direct entry plus a group, or two groups with different roles — the most privileged role wins.
Group membership is read from SCIM /Me using the caller's own forwarded OAuth token, since the app's service principal normally cannot search the SCIM directory. Nested groups (a group inside a group) are not expanded: only the groups Databricks reports directly on the user account are considered.
How Admin Detection Works
At runtime, the app reads the CAN_MANAGE principals of the Databricks App from the Permissions API and matches the logged-in user against them, both by e-mail and by group membership. The check uses the user's own OAuth token (forwarded by the Databricks Apps proxy via x-forwarded-access-token). This means:
- Admin detection uses the user's OAuth token when the Apps runtime forwards one.
- If the user's forwarded token is not available or lacks scope for
/api/2.0/permissions/apps/*, the app falls back to the SDK (service principal) and then a REST call with the SP token. - Those fallbacks require the app's service principal to have at least
CAN_VIEW_PERMISSIONSon its own app, which is not granted automatically when the app is created. - Without a forwarded user token the app cannot resolve group membership either, so a user who is an admin only through a group may be seen as a regular user. Grant the app the user-authorization scope so the token is forwarded.
First-Deploy Bootstrap (required once per workspace)
Databricks Apps do not grant the freshly-created service principal any permission on the app it runs. Until that is fixed, list_app_principals returns 403, the middleware cannot resolve any user (including CAN_MANAGE deployers), and the access-denied page appears on the very first request.
make deploy (via scripts/deploy.sh) runs the fix automatically. For manual deploys:
make bootstrap-perms
# equivalent to: scripts/bootstrap/app-permissions.sh ontobricks-XXX mcp-ontobricksThe script is idempotent. It discovers each app's service principal via databricks apps get and grants it CAN_MANAGE on itself. If the first post-deploy page load shows a "First-deploy bootstrap required" banner, that is exactly the situation — run the command and reload.
Managing Permissions
- Ensure you have CAN_MANAGE on the sandbox app
ontobricks-XXXin the Databricks UI (Compute > Apps > ontobricks-XXX > Permissions), or on your production app name if different - Open the app and go to Settings > Permissions
- Click Add to grant access to workspace users or groups
- Assign each principal a Viewer, Editor, or Builder role
- Users not in the list are blocked from accessing the app
Diagnostics
If a user reports "Access Denied", hit the diagnostic endpoint (accessible even when blocked):
https://<app-url>/settings/permissions/diag
This returns:
- The user's email and forwarded token status
- SDK (SP token) check result
- User-token check result
- Which principals have
CAN_MANAGE - The cached admin decision and its age
5. Deploying to a New Workspace
When moving OntoBricks to a different Databricks workspace, follow these steps.
5.1 — Authenticate to the new workspace
# Option A: Set as default
databricks auth login --host https://<new-workspace>.cloud.databricks.com
# Option B: Use a named profile
databricks auth login --host https://<new-workspace>.cloud.databricks.com --profile new-wsVerify:
databricks current-user me
# Or with a profile: databricks current-user me --profile new-ws5.1b — Create the Lakebase project (new workspace, first time)
# Create the project via the correct API (synced-tables-compatible):
./scripts/bootstrap/setup-lakebase.sh --name ontobricks-demo --capacity CU_2
# Copy DEFAULT_LAKEBASE_PROJECT / DEFAULT_LAKEBASE_DATABASE into deploy.config.sh
# (deploy.sh resolves the db-… segment; optional: LAKEBASE_DATABASE_RESOURCE_SEGMENT)5.2 — Prepare Unity Catalog resources
The new workspace needs a catalog/schema where OntoBricks can store projects and triple stores:
# Create a schema for OntoBricks (adjust catalog name)
databricks sql query "CREATE SCHEMA IF NOT EXISTS main.ontobricks"
# Create the registry volume
databricks sql query "CREATE VOLUME IF NOT EXISTS main.ontobricks.OntoBricksRegistry"5.3 — Update configuration files
scripts/deploy.config.sh — this is the single source of truth. Update the DEFAULT_* literals (or override via env) for the new workspace:
DEFAULT_APP_NAME="ontobricks-XXX" # your main app name
DEFAULT_MCP_APP_NAME="mcp-ontobricks"
DEFAULT_DAB_TARGET="dev-lakebase"
DEFAULT_WAREHOUSE_ID="<new-warehouse-id>"
DEFAULT_REGISTRY_CATALOG="<new-catalog>"
DEFAULT_REGISTRY_SCHEMA="<new-schema>"
DEFAULT_REGISTRY_VOLUME="registry"
DEFAULT_LAKEBASE_PROJECT="<lakebase-project-id>"
DEFAULT_LAKEBASE_BRANCH="production"
DEFAULT_LAKEBASE_DATABASE="<postgres-datname>"
# Optional override — normally resolved by deploy.sh from DEFAULT_LAKEBASE_DATABASE:
# LAKEBASE_DATABASE_RESOURCE_SEGMENT="<db-… from list-databases>"
DEFAULT_LAKEBASE_SCHEMA="ontobricks_registry"
DEFAULT_APP_TRIPLESTORE_TABLE="<catalog>.<schema>.<triplestore_table>"scripts/deploy.sh will pass every DEFAULT_* value to databricks bundle deploy as a --var= override and render app.yaml from the template.
databricks.yml — only the structural bits change here. Confirm each app's permissions: block (under resources.apps.*, not top-level) lists the deploying user with CAN_MANAGE (defaults use ${workspace.current_user.userName}). The variables: defaults are overridden by deploy.config.sh.
src/mcp-server/app.yaml — update the main app URL after the first deploy:
- name: ONTOBRICKS_URL
value: "https://<new-ontobricks-app-url>"5.4 — Deploy
# Validate first (use the same target you will deploy)
databricks bundle validate -t dev-lakebase
# Deploy and start main app (Lakebase target); start MCP separately if needed
scripts/deploy.sh -t dev-lakebase
databricks bundle run mcp_ontobricks_app -t dev-lakebase5.5 — Bind resources
- Go to Compute > Apps > ontobricks-XXX > Resources (or your main app name)
- Bind
sql-warehouseto a running SQL Warehouse - Bind
volumeto the registry UC Volume - Repeat for
mcp-ontobricks
5.6 — Initialize and verify
- Open the app URL — the registry schema is created by
make deploy. - Use Settings > Registry > Initialize only if you need an upgrade/repair.
- Verify both apps are Running:
databricks apps get ontobricks-XXXanddatabricks apps get mcp-ontobricks
5.7 — Update MCP server URL
After the main app is deployed and running:
# Get the main app URL
databricks apps get ontobricks-XXX -o json | python3 -c "import sys,json; print(json.load(sys.stdin)['url'])"Update ONTOBRICKS_URL in src/mcp-server/app.yaml with this URL, then redeploy the bundle and restart the MCP app:
databricks bundle deploy -t dev-lakebase
databricks bundle run mcp_ontobricks_app -t dev-lakebaseNew Workspace Checklist
[ ] 1. databricks auth login --host https://<new-workspace>
[ ] 2. Verify: databricks current-user me
[ ] 3. Create Unity Catalog resources (catalog, schema, volume)
[ ] 4. Create Lakebase project via `scripts/bootstrap/setup-lakebase.sh` (run BEFORE deploy — copy the `db-…` id into `deploy.config.sh`)
Resolve the db-… resource id with:
databricks postgres list-databases \
"projects/<project>/branches/<branch>" -o json
[ ] 5. Edit scripts/deploy.config.sh:
- DEFAULT_APP_NAME / DEFAULT_MCP_APP_NAME
- DEFAULT_WAREHOUSE_ID
- DEFAULT_REGISTRY_CATALOG / _SCHEMA / _VOLUME
- DEFAULT_LAKEBASE_PROJECT / _BRANCH / _DATABASE / _SCHEMA
- DEFAULT_APP_TRIPLESTORE_TABLE
[ ] 6. Confirm databricks.yml app permissions under resources.apps.* (CAN_MANAGE for you, CAN_USE for users)
[ ] 7. make bundle-validate
[ ] 8. make deploy # scripts/deploy.sh -t dev-lakebase
[ ] 9. Bind sql-warehouse, volume, postgres resources in the Apps UI
if the bundle bind didn't take (both apps: APP_NAME, MCP_APP_NAME)
[ ] 10. Grant UC privileges to each app's service principal (see §3):
registry USE CATALOG / USE SCHEMA / CREATE TABLE / CREATE VIEW +
volume READ/WRITE + source-table SELECT
[ ] 11. Open app → Settings → Registry → Initialize only for upgrade/repair
[ ] 12. Re-run make deploy (or scripts/bootstrap/lakebase-perms.sh) if grants need a refresh
[ ] 13. Verify both apps are RUNNING
[ ] 14. Update ONTOBRICKS_URL in src/mcp-server/app.yaml with the main app URL
[ ] 15. databricks bundle deploy -t dev-lakebase && databricks bundle run mcp_ontobricks_app -t dev-lakebase
[ ] 16. Verify MCP appears in Databricks Playground
6. Triple Store & Graph DB Backend Configuration
OntoBricks always materializes both a Delta view (Unity Catalog) and a Graph DB engine (Lakebase Postgres). Both layers are pluggable through their respective factories — see docs/graphdb-integration.md for adding a new Graph DB engine.
Delta view (view) — No Extra Setup Required
The Delta view is created by R2RML on a Databricks SQL Warehouse and persists triples for governance and lineage. On Databricks Apps, the app's service principal authenticates via OAuth automatically — the only requirement is the SQL Warehouse resource declared in app.yaml (already configured).
Lakebase Postgres (graph, engine lakebase) — Bound by databricks.yml
Two write modes are available. Settings → Lakebase proposes Managed sync; omitted sync_mode still means app_managed at runtime:
managed_synced(Settings proposal): Databricks Lakeflow Snapshot-syncs a Postgres table from the R2RML view (SyncedTableManager.ensure+trigger_and_wait). Triggered/Continuous are not available (the view has no CDF). A writable companion table absorbs reasoning / cohort writes; readers see both via a UNION view.app_managed(runtime fallback when the key is omitted): the FastAPI app streams R2RML rows infetchmanybatches and ingests viaCOPY FROM STDIN+INSERT … ON CONFLICT DO NOTHING.
The scripts/bootstrap/lakebase-perms.sh script grants the app SP the required Lakebase / Postgres privileges (CREATE on the schema, INSERT/SELECT/DELETE on the per-domain tables). Run it once after the bundle is deployed.
7. MCP Server Deployment (Databricks Playground)
The MCP server (mcp-ontobricks) is a separate Databricks App that exposes OntoBricks knowledge-graph tools to the Databricks Playground. It must have a name starting with mcp- to be discoverable.
Prerequisites
| Requirement | Details |
|---|---|
| Main app deployed | Your main app (ontobricks-XXX in examples — the name under ontobricks_dev_app in databricks.yml) must be deployed and running first |
| Databricks CLI | Authenticated to the same workspace |
| Playground access | Databricks Playground must be enabled |
Deploy with DAB
The MCP server is deployed alongside the main app by the same databricks.yml bundle:
# Deploy both app definitions (single bundle deploy)
databricks bundle deploy -t dev-lakebase
# Or the convenience script (starts main app only — start MCP separately)
scripts/deploy.sh -t dev-lakebase
# After the main app is up, start the MCP app if needed
databricks bundle run mcp_ontobricks_app -t dev-lakebaseMCP app.yaml Configuration
command:
- "uv"
- "run"
- "mcp-ontobricks"
env:
- name: ONTOBRICKS_URL
value: "https://<your-ontobricks-app-url>"
- name: DATABRICKS_SQL_WAREHOUSE_ID
valueFrom: sql-warehouse
- name: REGISTRY_VOLUME_PATH
valueFrom: volume
resources:
- name: sql-warehouse
sql_warehouse:
permission: CAN_USE
- name: volume
volume:
permission: CAN_READ_WRITEImportant: Update
ONTOBRICKS_URLto match your main app's URL before deploying. Find it with:databricks apps get ontobricks-XXX -o json | python3 -c "import sys,json; print(json.load(sys.stdin)['url'])"
Post-Deployment Resource Binding
After the first deployment, bind the MCP server's resources:
- Go to Compute > Apps > mcp-ontobricks > Resources
- Bind
sql-warehouseto the same SQL Warehouse used by the main app - Bind
volumeto the same registry UC Volume
Grant the MCP App Access to the Main App
The MCP server calls the main app's REST API using its service principal's OAuth token. The users group should already have CAN_USE on the main app (set in databricks.yml). If it doesn't:
databricks apps update-permissions ontobricks-XXX --json '{
"access_control_list": [
{ "group_name": "users", "permission_level": "CAN_USE" }
]
}'Use your real main app name everywhere ontobricks-XXX appears (from databricks.yml).
Using in Databricks Playground
- Go to your Databricks workspace
- Navigate to Playground
mcp-ontobricksappears in the MCP Servers list (apps starting withmcp-are shown automatically)- Select it to use OntoBricks knowledge-graph tools in conversations
Available MCP Tools
| Tool | Description |
|---|---|
list_projects |
List all projects (graph viewers) in the registry with names and descriptions |
select_project |
Activate a project by name — subsequent queries operate on its triple store |
list_entity_types |
Human-readable overview of the selected project's graph viewer (entity types, counts, predicates) |
describe_entity |
Search by name/type and get a full-text description with attributes, relationships, and BFS traversal |
get_status |
Compact diagnostic: project, backend, table, data availability, triple count |
Standalone / Local MCP Usage
For LLM clients like Cursor or Claude Desktop (stdio transport):
cd mcp-server
uv run --frozen python -c \
"from server.app import create_mcp_server; create_mcp_server('standalone').run(transport='stdio')"Or via the convenience wrapper at the project root:
python src/mcp-server/mcp_server.py # stdio (default)
python src/mcp-server/mcp_server.py --http # streamable-http on port 9100Override the target URL:
ONTOBRICKS_URL=http://your-host:8000 python src/mcp-server/mcp_server.pyClient Configuration Examples
Cursor (.cursor/mcp.json):
{
"mcpServers": {
"ontobricks": {
"command": "uv",
"args": ["run", "python", "-c",
"from server.app import create_mcp_server; create_mcp_server('standalone').run(transport='stdio')"
],
"cwd": "/path/to/OntoBricks/mcp-server"
}
}
}Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"ontobricks": {
"command": "uv",
"args": ["run", "python", "-c",
"from server.app import create_mcp_server; create_mcp_server('standalone').run(transport='stdio')"
],
"cwd": "/path/to/OntoBricks/mcp-server",
"env": { "ONTOBRICKS_URL": "http://localhost:8000" }
}
}
}8. MLflow Agent Observability
OntoBricks agents are instrumented with MLflow tracing. When deployed to Databricks, traces are persisted to the workspace tracking server.
How It Works
MLFLOW_TRACKING_URI=databricksis set inapp.yaml- Application startup in
src/shared/fastapi/main.pycallssetup_tracing(), which creates the/Shared/ontobricks-agentsexperiment - Every agent call (OWL Generator, Auto-Mapping, Auto Icon Assign, Ontology Assistant) produces a span tree:
AGENT (run_agent)
├── LLM (call_serving_endpoint) — AI Gateway or Serving target, tokens, latency
├── TOOL (tool:get_metadata) — arguments, result
├── LLM (call_serving_endpoint) — next iteration
├── TOOL (tool:execute_sql) — SQL query, result
└── ...
Viewing Traces
- In your Databricks workspace, go to Machine Learning > Experiments
- Open
/Shared/ontobricks-agents - Click any run, then the Traces tab
Configuration
| Variable | Default | Description |
|---|---|---|
MLFLOW_TRACKING_URI |
(none) | Set to databricks for persistent traces |
ONTOBRICKS_MLFLOW_EXPERIMENT |
ontobricks-agents |
Experiment name (auto-prefixed with /Shared/ on Databricks) |
Tracing degrades gracefully: if MLflow is not configured, agents run normally without traces.
9. DAB Reference
Bundle Structure
OntoBricks/
├── databricks.yml # Bundle definition + sync.include / sync.exclude
├── .databricksignore # Mirror of sync.exclude (not read by the CLI)
├── app.yaml # Main app runtime config
├── src/mcp-server/
│ └── app.yaml # MCP server runtime config
└── docs/ # Help Center markdown + images + screenshots
Targets
| Target | Mode | Description |
|---|---|---|
dev |
development | Volume-only registry backend — no Apps postgres resource. |
dev-lakebase |
development | Same apps plus Lakebase Autoscaling postgres binding (default for make deploy / scripts/deploy.sh). |
databricks bundle deploy -t dev-lakebase
databricks bundle run ontobricks_dev_app -t dev-lakebase
databricks bundle run mcp_ontobricks_app -t dev-lakebaseVariables
Override defaults with --var flags or in a target-specific variables: block. Authoritative defaults live in databricks.yml; the table below summarizes intent:
| Variable | Description |
|---|---|
warehouse_id |
SQL Warehouse ID for the sql-warehouse resource. |
registry_catalog / registry_schema / registry_volume |
UC triple for the volume resource (catalog.schema.volume name). |
lakebase_project / lakebase_branch / lakebase_database_resource_segment |
Lakebase Autoscaling binding (final segment must be db-… from list-databases). |
lakebase_registry_schema |
Postgres schema for the registry (mirror LAKEBASE_SCHEMA in app.yaml). |
databricks bundle deploy -t dev-lakebase --var warehouse_id=abc123def456Makefile targets (excerpt)
make deploy # scripts/deploy.sh -t dev-lakebase
make deploy-volume # Volume-only: scripts/deploy.sh -t dev
make deploy-no-run # Deploy without bundle run
make bundle-validate # databricks bundle validate -t dev-lakebase
make bundle-summary # databricks bundle summary -t dev-lakebase
make bootstrap-perms # app SP CAN_MANAGE on self (see scripts/bootstrap/app-permissions.sh)
make bootstrap-lakebase # Lakebase schema grants (see scripts/bootstrap/lakebase-perms.sh)File Sync
DAB uploads git-tracked files minus .gitignore, then applies databricks.yml sync.include / sync.exclude (gitignore syntax). .databricksignore is a readable copy of that exclude list for reviewers and unit tests — the Databricks CLI does not apply it.
Must ship (runtime):
| Path | Why |
|---|---|
src/ |
App code. Includes src/mcp-server/ (MCP source_code_path) and src/jobs/ (graph-analytics workspace file). |
run.py, app.yaml, pyproject.toml, uv.lock, requirements.txt |
Process entry + dependency install |
LICENSE.txt, NOTICE.txt |
Databricks License and project notice |
Catalogued docs/*.md |
Help Center (/api/help/docs/{slug}) — allow-list in src/api/routers/internal/help.py |
docs/images/, docs/screenshots/ |
Help Center assets |
Must not ship: tests, CI, scripts, changelogs, .github/, .planning/, .cursor/, licenses/, Sphinx/demo docs (docs/sphinx/, docs/superpowers/, docs/diagrams/, docs/pr47-neo4j-demo/, checklists), resources/*.yml (parsed locally by DAB, not needed in the Apps files tree), and root meta markdown.
Most root-only patterns are anchored (/CONTRIBUTING.md, /AGENTS.md, …). README is the exception: CLI 0.298 applies both README.md and /README.md recursively, so either excludes docs/README.md and 404s Help Center Overview. Both README files therefore ship.
Do not exclude src/mcp-server/: both apps share one workspace files tree; the MCP app’s source_code_path is ./src/mcp-server. Both app.yaml.template files also ship: this CLI matches even an anchored /app.yaml.template recursively, while the deployment source guard requires src/mcp-server/app.yaml.template.
Binding existing apps
If the apps already exist in the workspace from a previous deployment:
databricks bundle deployment bind ontobricks_dev_app ontobricks-XXX -t dev-lakebase --auto-approve
databricks bundle deployment bind mcp_ontobricks_app mcp-ontobricks -t dev-lakebase --auto-approve
databricks bundle deploy -t dev-lakebase10. Full Deployment Checklist
Use this checklist when deploying OntoBricks from scratch on any workspace:
[ ] 1. Databricks CLI installed (>= 0.250.0) and authenticated
databricks auth login --host https://<workspace>
databricks current-user me
[ ] 2. SQL Warehouse created and running
[ ] 3. Unity Catalog resources available:
[ ] A catalog you can use (e.g., main or your personal catalog)
[ ] A schema within that catalog (e.g., ontobricks)
[ ] A Volume for the project registry (e.g., OntoBricksRegistry)
[ ] 4. Lakebase project created via `scripts/bootstrap/setup-lakebase.sh` (`DEFAULT_LAKEBASE_PROJECT` / `DEFAULT_LAKEBASE_DATABASE` set in `deploy.config.sh`)
(required since v0.4.0 — Provisioned tier is not supported).
Resolve the db-… resource id:
databricks postgres list-databases \
"projects/<project>/branches/<branch>" -o json
[ ] 5. psql available (brew install libpq && brew link --force libpq)
[ ] 6. Edit scripts/deploy.config.sh:
[ ] DEFAULT_APP_NAME / DEFAULT_MCP_APP_NAME
[ ] DEFAULT_WAREHOUSE_ID
[ ] DEFAULT_REGISTRY_CATALOG / _SCHEMA / _VOLUME
[ ] DEFAULT_LAKEBASE_PROJECT / _BRANCH / _DATABASE
[ ] DEFAULT_LAKEBASE_SCHEMA (mirrored as LAKEBASE_SCHEMA in app.yaml)
[ ] DEFAULT_APP_TRIPLESTORE_TABLE
[ ] 7. Confirm databricks.yml app permissions under resources.apps.* (CAN_MANAGE for you, CAN_USE for users)
[ ] 8. Validate: make bundle-validate
[ ] 9. Deploy: make deploy # runs scripts/deploy.sh -t dev-lakebase
[ ] 10. Verify bundle bound sql-warehouse / volume / postgres on both apps
(UI: Compute > Apps > <app> > Resources). Re-bind manually if not.
[ ] 11. Grant Unity Catalog privileges to each app service principal (see §3):
[ ] Registry catalog: USE CATALOG
[ ] Registry schema : USE SCHEMA + CREATE TABLE + CREATE VIEW
[ ] Registry volume : READ VOLUME + WRITE VOLUME
[ ] Each source catalog/schema referenced in R2RML mappings:
USE CATALOG + USE SCHEMA + SELECT (per table or schema-wide)
[ ] 12. App self-permissions:
make bootstrap-perms
(already invoked by `make deploy`, but safe to re-run anytime.)
[ ] 13. Registry schema: created by `make deploy`. Settings → Registry → Initialize is upgrade/repair only.
[ ] 14. Re-run Lakebase GRANT bootstrap if needed:
make bootstrap-lakebase
(also runs as part of `make deploy`; idempotent.)
[ ] 15. Verify main app is RUNNING:
databricks apps get <main-app>
[ ] 16. (If using MCP) Update ONTOBRICKS_URL in src/mcp-server/app.yaml:
databricks apps get <main-app> -o json | python3 -c "import sys,json; print(json.load(sys.stdin)['url'])"
[ ] 17. (If using MCP) Redeploy and start MCP:
databricks bundle deploy -t dev-lakebase && databricks bundle run mcp_ontobricks_app -t dev-lakebase
[ ] 18. (If using MCP) Verify in Databricks Playground
11. Troubleshooting
App Won't Start
# Check app status (use your bundle’s app names)
databricks apps get ontobricks-XXX
databricks apps get mcp-ontobricks
# Check recent deployment status
databricks apps list-deployments ontobricks-XXX"Access Denied" Despite Having CAN_MANAGE
- Hit the diagnostic endpoint:
https://<app-url>/settings/permissions/diag - Check
user_token_present— should betruein Databricks App mode - Check
user_token_can_manage— should list your email - If
email_is_managerisfalse, verify your email matches the CAN_MANAGE grant exactly - Check
admin_cache— if stale, restart the app to clear it
"Databricks credentials not configured"
The agents need OAuth credentials to call the domain LLM (AI Gateway or Model Serving). In a Databricks App, these are resolved automatically via the service principal. If you see this error:
- Verify the app is running as a Databricks App (not locally)
- Check that an LLM is saved in Domain Information → AI (or choose No LLM if AI is intentionally disabled)
- Review app logs for OAuth token resolution errors
Connection Errors
- Verify the SQL Warehouse is running and the resource binding is correct
- Check the SP has correct permissions on catalogs/schemas — see §3 Unity Catalog Permissions for the Service Principal
- Review app logs in the Databricks Apps UI
Knowledge Graph Sync: PERMISSION_DENIED / Failed to create VIEW
If Sync fails with a message like
Sync failed: Failed to create VIEW: PERMISSION_DENIED:
User does not have MANAGE on Table '<cat>.<schema>.triplestore_<domain>_v<n>'.
then an object with the same name already exists in UC as a TABLE — typically left behind by a legacy materialised build — and CREATE OR REPLACE VIEW cannot overwrite it. Drop the stale object once as an admin and retry:
DROP TABLE IF EXISTS `<cat>`.`<schema>`.`triplestore_<domain>_v<n>`;If the failure is a plain PERMISSION_DENIED without a pre-existing object, the app SP is missing a UC grant — see §3.2 for the registry schema and §3.3 for source tables.
Knowledge Graph Sync: TABLE_OR_VIEW_NOT_FOUND
The app SP lacks USE CATALOG / USE SCHEMA / SELECT on one of the source tables referenced in an R2RML mapping. Identify which source from the error message and grant per §3.3.
localhost Redirects When Deployed
All internal navigation links must include a trailing slash (e.g., /dtwin/ not /dtwin). FastAPI's redirect_slashes generates localhost:8000 redirects behind the Databricks proxy.
Module Import Errors After Redeployment
Stale __pycache__ or old directories in the workspace can cause import conflicts:
# Remove stale workspace files if needed
databricks workspace delete /Users/<you>/ontobricks/<stale-dir> --recursiveMCP Server Returns 401 Unauthorized
The MCP app's SP needs CAN_USE permission on the main app. The users group should already have this via databricks.yml.
Agent Traces Not Appearing
- Verify
MLFLOW_TRACKING_URI=databricksis set inapp.yaml - Check the app logs for
MLflow tracing enabled — experiment='/Shared/ontobricks-agents' - Run an agent call (e.g., generate an ontology) to create the first trace
- The experiment is created on first use, not at startup
12. Production Considerations
Security
- Never commit
.envfiles or secrets to Git - Use Databricks Secrets for sensitive data (passwords, tokens)
- Use service principals for production (automatically handled by Databricks Apps)
Performance
- Use an appropriately sized SQL Warehouse (enable auto-stop to save costs)
Monitoring
- App logs: Available in the Databricks Apps console
- Log level: Configure via
LOG_LEVELenvironment variable (DEBUG,INFO,WARNING,ERROR) - Structured JSON logs: Set
LOG_FORMAT=jsonto emit one JSON object per log line — ideal for log aggregation and search - Request timing: Every non-static request is logged with method, path, status code, and duration in milliseconds
- Thread pool: Tune concurrent blocking work via
ONTOBRICKS_THREAD_POOL_SIZE(default20) - Health checks:
GET /healthis a public, cheap liveness probe — it only checks that the temp and session directories are writable and returns{status, version, service, timestamp}, with no per-check detail or error text. It always returns HTTP 200. The full readiness probe (Databricks auth, SQL warehouse, registry catalog/schema DDL, Lakebase USAGE, …) lives at the admin-onlyGET /settings/diagnostics/readinessand returns{status, summary:{ok,warnings,errors}, checks:[…]}; Settings → Health → Databricks calls it. If the app fails to start, the fallback/healthand/return a generic message — the traceback is only in the app logs. - Agent traces: View under Machine Learning > Experiments >
/Shared/ontobricks-agents— each agent call shows a span tree with inputs, outputs, latency, and token usage
Updating
# Pull latest code and redeploy
git pull origin main
scripts/deploy.sh -t dev-lakebase
databricks bundle run mcp_ontobricks_app -t dev-lakebaseDeployment checklist
Operator preflight for a first deploy or a new workspace. Automate most checks with:
make deploy-check
# or, equivalently:
scripts/_internal/check-deploy-prerequisites.sh
scripts/deploy.sh --dry-run1. Local workstation
| Requirement | Why | How to verify |
|---|---|---|
| Python ≥ 3.10 | App + tooling | python3 --version |
| uv | Dependency install (make install, make setup) |
uv --version (setup.sh installs it if missing) |
| Databricks CLI ≥ 0.250.0 | Bundle deploy, bootstrap scripts | databricks version |
| python3 | JSON parsing, app.yaml render | python3 --version |
| psql (libpq client) | bootstrap-lakebase-perms.sh, SQL upgrade scripts |
psql --version — macOS: brew install libpq && brew link --force libpq |
| curl | setup-lakebase.sh provisioning API calls |
curl --version |
| Git clone + venv | Project source | make setup or make install |
Local-only check:
scripts/_internal/check-deploy-prerequisites.sh --local2. Databricks CLI authentication
| Requirement | Why | How to verify |
|---|---|---|
| Authenticated profile | Every deploy / bootstrap step | databricks current-user me |
| Correct workspace profile | Avoid granting on the wrong project | Set DEFAULT_DATABRICKS_PROFILE inferences in scripts/deploy.config.sh |
databricks auth login --host https://<workspace> --profile <profile>3. Workspace resources (created if missing on make deploy)
Configure in scripts/deploy.config.sh (single source of truth). make deploy on a Lakebase target creates missing catalog, schema, Lakebase project/database, and initializes the Postgres registry schema.
| Resource | Config variable(s) | Permission you need |
|---|---|---|
| SQL warehouse | DEFAULT_WAREHOUSE_ID (empty → workspace Serverless Starter Warehouse) |
CAN USE |
| Unity Catalog catalog | DEFAULT_REGISTRY_CATALOG |
USE CATALOG, CREATE CATALOG (first time) |
| UC schema | DEFAULT_REGISTRY_SCHEMA |
CREATE SCHEMA on the catalog (first time) |
| Lakebase project | DEFAULT_LAKEBASE_PROJECT |
CAN USE; setup-lakebase.sh is invoked by make deploy when missing |
| Lakebase branch | DEFAULT_LAKEBASE_BRANCH |
Usually production |
| Postgres database (datname) | DEFAULT_LAKEBASE_DATABASE |
Created by setup-lakebase.sh — use status.postgres_database from list-databases, not the hyphenated db-… id |
| Postgres registry schema | DEFAULT_LAKEBASE_SCHEMA |
Created by make deploy (LakebaseRegistryStore.initialize()) |
| Databricks Apps (sandbox) | DEFAULT_APP_NAME, DEFAULT_MCP_APP_NAME |
Created by make deploy on first run |
Verify resources:
databricks warehouses get <WAREHOUSE_ID>
databricks postgres list-databases "projects/<project>/branches/<branch>" -o json4. Lakebase bootstrap (bootstrap-lakebase-perms.sh)
Run automatically on every dev-lakebase deploy (make deploy), or manually:
make bootstrap-lakebase| Requirement | Why |
|---|---|
| psql on PATH | Connects with a minted Lakebase JWT |
| CLI authenticated as schema owner (or GRANT OPTION) | Applies GRANTs + idempotent DDL migrations |
| Active Postgres endpoint | Project/branch must expose a host via /api/2.0/postgres/.../endpoints |
| Registry schema exists | make deploy creates it. CAN_USE + pgcrypto are applied even before tables exist; schema GRANTs need the schema |
| Apps deployed | Service principal ids are resolved from existing apps (warn-only on first deploy) |
pgcrypto in public |
Companion __app tables need digest(..., 'sha256'). Step 1b installs it in public and relocates a stranded copy — an extension sitting in a graph schema is invisible once that schema changes. Applies per database, so the graph DB needs it too |
Preflight (read-only):
scripts/_internal/check-deploy-prerequisites.sh --lakebase5. In-place app upgrade (0.6.x → 0.7.0)
v0.7.0 derives app name + DAB target from DEFAULT_INSTANCE_ID (ontobricks-<id>, dev-lakebase-<id>). Changing the app name under the same Terraform state is a destroy-then-create (Databricks app names are immutable). Deploy preflight blocks that unless you confirm.
| Goal | What to set | Result |
|---|---|---|
| Refresh the live 0.6.x app | DEFAULT_INSTANCE_ID=<suffix of live app> (e.g. 060 for ontobricks-060) and DAB_TARGET=dev-lakebase (or DEFAULT_DAB_TARGET="dev-lakebase" in deploy.config.sh) |
Same app URL; existing unsuffixed state updated |
| New parallel instance | New DEFAULT_INSTANCE_ID only (default 07x) |
New app + new dev-lakebase-<id> state; old app left running |
| Rename under same target | Different app name, same DAB_TARGET |
Destroys the old app — confirm via preflight / ALLOW_APP_RENAME=1 |
In-place example:
DEFAULT_INSTANCE_ID=060 DAB_TARGET=dev-lakebase make deployKeep Lakebase / UC variables pointed at the same registry. Then apply registry DDL (§6) if you have not already via make bootstrap-lakebase.
Full narrative: releases/ReleaseNotes_V0.7.0.md → Upgrade Notes → Keep the existing Databricks app.
6. Registry DB upgrades (0.4 → 0.5 → 0.6 → 0.7 → 0.8)
For in-place upgrades of an existing Lakebase registry, schema DDL must be applied as the schema owner. OntoBricks applies the same objects in four ways (pick one):
make bootstrap-lakebase/scripts/bootstrap/lakebase-perms.sh(recommended — idempotent Step 2b; runs automatically frommake deploy)scripts/migrations/upgrade_0.4_to_0.5.sql— addsdomain_versions.status+ backfill frommcp_enabledscripts/migrations/upgrade_0.5_to_0.6.sql— collaborative tables, graph analytics, edit locks, change eventsscripts/migrations/upgrade_0.6_to_0.7.sql— generic scheduled-task columns onschedules/schedule_runs+ unique-constraint swapscripts/migrations/upgrade_0.7_to_0.8.sql—domains.mcp_policy(per-domain MCP tool + context policy). No backfill: the{}default reproduces pre-0.8 behaviour
Preflight reports pending or stale migration objects before deploy:
python3 scripts/_internal/_lakebase_preflight.py \
--project "$LAKEBASE_PROJECT" \
--branch "$LAKEBASE_BRANCH" \
--database "$LAKEBASE_DATABASE" \
--schema "$LAKEBASE_SCHEMA"Manual upgrade example (0.7 → 0.8):
psql "host=<endpoint> dbname=<datname> sslmode=require user=<you>" \
-v reg_schema=<schema> \
-f scripts/migrations/upgrade_0.7_to_0.8.sql7. App permission bootstrap (bootstrap-app-permissions.sh)
Run automatically after deploy, or manually:
make bootstrap-perms| Requirement | Why |
|---|---|
| Apps exist | Resolves each app's service principal |
| CAN_MANAGE on both apps | Your user must grant CAN_MANAGE to each app's own SP |
| CAN_MANAGE_RUN on graph-analytics job | App SP must list/trigger ${app_name}-graph-analytics (ACL-filtered jobs.list) |
| UC schema ALL_PRIVILEGES | SPs need CREATE OR REPLACE on registry objects |
8. Deploy workflow (happy path)
[ ] Edit scripts/deploy.config.sh (DEFAULT_INSTANCE_ID, Lakebase coords, warehouse, UC;
for a pre-0.7 in-place upgrade also set DEFAULT_DAB_TARGET=dev-lakebase — see §5)
[ ] scripts/_internal/check-deploy-prerequisites.sh # or make deploy-check
[ ] make deploy-dry-run # read-only full orchestrator check
[ ] make deploy # deploy + create-if-missing registry + bootstrap
[ ] Databricks Apps UI: bind sql-warehouse, postgres (first time only)
[ ] App UI: Settings → Registry → Initialize # upgrade/repair only, not first install
[ ] make bootstrap-lakebase # if grants need a refresh
[ ] App UI: Settings → Graph DB → Create graph DB # grants graph schema separately
9. Optional / mode-specific
| Item | When needed |
|---|---|
uv sync --frozen --extra pitfalls |
ML-based pitfalls detection panel |
managed_synced graph mode |
UC catalog ALL_PRIVILEGES (-c / UC_CATALOG on bootstrap script) |
| Lakebase via UI “New project” | Avoid for Synced Tables — use scripts/bootstrap/setup-lakebase.sh instead |
| Volume-only backend | Deploy with make deploy-volume (-t dev) — skips Lakebase checks |
Quick reference — scripts
| Script | Purpose |
|---|---|
scripts/_internal/check-deploy-prerequisites.sh |
Read-only preflight (this checklist, automated) |
scripts/deploy.sh --dry-run |
Full DAB validate + resource checks, no mutations |
scripts/bootstrap/setup-lakebase.sh |
Create Synced-Tables-compatible Lakebase project |
scripts/bootstrap/lakebase-perms.sh |
CAN_USE + schema GRANTs + registry migrations |
scripts/bootstrap/app-permissions.sh |
App SP self-perms + MCP CAN_USE + UC schema grants |
scripts/migrations/upgrade_0.4_to_0.5.sql |
Explicit 0.4→0.5 lifecycle migration |
scripts/migrations/upgrade_0.5_to_0.6.sql |
Explicit 0.5→0.6 collaborative / analytics migration |
scripts/migrations/upgrade_0.6_to_0.7.sql |
Explicit 0.6→0.7 generic scheduled-task migration |
scripts/migrations/upgrade_0.7_to_0.8.sql |
Explicit 0.7→0.8 per-domain MCP policy migration |
Asset Bundle reference
The bundle configuration lives at the project root (databricks.yml) as required by the Databricks CLI.
See also: Databricks Asset Bundles docs
What Gets Deployed
| App | Bundle Key | Name | Description |
|---|---|---|---|
| OntoBricks | ontobricks_app |
ontobricks |
Main FastAPI application — ontology editor, mapping, Knowledge Graph builder |
| MCP Server | mcp_ontobricks_app |
mcp-ontobricks |
Model Context Protocol companion — exposes knowledge-graph tools to the Databricks Playground |
Quick Start
# From the project root:
# 1. Validate
databricks bundle validate
# 2. Deploy both apps (configured Lakebase target)
make deploy
# Or deploy/run explicitly:
databricks bundle deploy -t <DAB_TARGET>
databricks bundle run ontobricks_dev_app -t <DAB_TARGET>
databricks bundle run mcp_ontobricks_app -t <DAB_TARGET>
# DAB_TARGET normally comes from scripts/deploy.config.sh.Convenience Script (scripts/deploy.sh)
scripts/deploy.sh # validate + deploy + run both apps
scripts/deploy.sh -t dev # explicit Volume-only target
scripts/deploy.sh -t dev-lakebase # legacy unsuffixed Lakebase target
scripts/deploy.sh --no-run # deploy without starting either app
scripts/deploy.sh --bind # bind existing apps during deployment
scripts/deploy.sh --dry-run # preflight and validate without changesTargets
| Target | Mode | Description |
|---|---|---|
dev |
development | Volume-only registry backend. |
dev-lakebase |
development | Legacy unsuffixed Lakebase target. |
dev-lakebase-<INSTANCE_ID> |
development | Generated per-instance Lakebase target used by make deploy. |
Variables
Override defaults with --var flags or in a target-specific variables: block:
| Variable | Description |
|---|---|
app_name / mcp_app_name |
Main and MCP Databricks App names |
warehouse_id |
SQL Warehouse bound to both apps |
registry_catalog / registry_schema / registry_volume |
Unity Catalog registry Volume |
lakebase_project / lakebase_branch / lakebase_database_resource_segment |
Lakebase Autoscaling binding |
lakebase_registry_schema |
Postgres schema used by the registry |
databricks bundle deploy --var warehouse_id=abc123def456Binding Existing Apps
If the apps already exist from a previous manual deployment:
databricks bundle deployment bind ontobricks_app ontobricks
databricks bundle deployment bind mcp_ontobricks_app mcp-ontobricks
databricks bundle deployPost-Deploy Steps (First Time Only)
- Bind resources — In the Databricks Apps UI, bind
sql-warehouse(and postgres on Lakebase targets) for both apps - Registry —
make deployinitializes the registry. Use Settings > Registry > Initialize only for upgrade/repair. - Set MCP URL — Update
ONTOBRICKS_URLinsrc/mcp-server/app.yamlwith the main app URL
Resource bindings persist across redeployments.
File Sync
DAB sync = git-tracked files − .gitignore + sync.include − sync.exclude in databricks.yml. .databricksignore is a human/test mirror only.
Shipped: src/ (including MCP + src/jobs/), run.py, app.yaml, lockfiles, LICENSE.txt / NOTICE.txt, and the Help Center set (docs/*.md catalogued in help.py, plus docs/images/ and docs/screenshots/).
Not shipped: tests, CI, scripts, changelogs, .github/, .planning/, third-party licenses/, Sphinx/demo docs, DAB YAML under resources/.
Do not exclude README.md or /README.md: CLI 0.298 applies both recursively and drops Help Center Overview (docs/README.md). Both README files ship.
Do not exclude src/mcp-server/; both apps share one files tree. Keep both app.yaml.template files too: this CLI matches an anchored root-template exclude recursively, and the deploy guard requires the MCP template.
Key Files
| File | Purpose |
|---|---|
databricks.yml |
Bundle definition — apps, permissions, targets, sync.exclude |
app.yaml |
Main app runtime config (command, env vars, resources) |
src/mcp-server/app.yaml |
MCP server runtime config |
.databricksignore |
Mirror of sync.exclude (CLI does not read it) |
scripts/deploy.sh |
Convenience wrapper around DAB commands |
Production sizing questionnaire
Use this questionnaire to collect the information needed to size a production OntoBricks deployment on Databricks. Complete all Required fields. Complete the Optional fields when the information is available; otherwise, state Unknown.
This questionnaire gathers workload characteristics. It does not constitute a price quote or capacity commitment. The resulting estimate should document all assumptions and include expected growth.
1. Customer and Databricks Environment
- Required — Customer or project name: ______________________________
- Required — Target go-live date: ______________________________
- Required — Cloud provider: [ ] AWS [ ] Azure [ ] GCP
- Required — Databricks region: ______________________________
- Required — Databricks platform tier: ______________________________
- Required — Unity Catalog enabled: [ ] Yes [ ] No
- Required — Databricks Apps enabled: [ ] Yes [ ] No [ ] To confirm
- Required — Lakebase Autoscaling available in the target region: [ ] Yes [ ] No [ ] To confirm
- Optional — Compliance requirements: [ ] None [ ] HIPAA [ ] PCI [ ] Other: ______________________________
- Optional — Enhanced Security and Compliance add-on required: [ ] Yes [ ] No [ ] To confirm
2. Users and Concurrency
- Required — Total named OntoBricks users: ______________________________
- Required — Expected concurrent users at peak: __________________________
- Required — User distribution:
- Viewers: ______________________________
- Ontology editors: ______________________________
- Graph builders or operators: ______________________________
- Administrators: ______________________________
- Required — Typical production usage window: ______ hours/day, ______ days/week
- Optional — Expected concurrent API or MCP clients: _____________________
- Optional — Expected annual user growth: ______________________________ %
3. Source Data
Repeat this section for each materially different source or workload.
Source or workload: ______________________________
- Required — Source type: [ ] Unity Catalog table/view [ ] File [ ] External database [ ] SaaS application [ ] Other: ________________
- Required — Current data volume: __________________ [ ] GB [ ] TB
- Required — Number of tables or views: ______________________________
- Required — Total row count: ______________________________
- Required — Daily data change: __________________ [ ] GB [ ] TB [ ] rows
- Required — Update pattern: [ ] Full refresh [ ] Incremental [ ] Change Data Capture [ ] Append-only
- Required — Refresh frequency: ______________________________
- Optional — Largest table: __________________ [ ] GB [ ] TB; __________________ rows
- Optional — Average row width, if known: __________________ bytes
- Optional — Data retention period: ______________________________
- Optional — Existing ingestion service: ______________________________
Add another copy of this subsection for each additional source or workload.
4. Ontology and Mapping Complexity
- Required — Number of business domains: ______________________________
- Required — Number of production ontology versions retained per domain:
______________________________ - Required — Estimated ontology size per domain:
- Entity or class types: ______________________________
- Relationship types: ______________________________
- Attributes or properties: ______________________________
- Required — Estimated number of source-to-ontology mappings:
______________________________ - Required — Typical mapping complexity: [ ] Simple column mapping [ ] Joins across tables [ ] Complex SQL transformations [ ] Mixed
- Optional — Maximum tables joined by one mapping: _______________________
- Optional — Reasoning features used: [ ] None [ ] OWL 2 RL [ ] SWRL rules [ ] SHACL validation
- Optional — Estimated number of SWRL rules: ____________________________
- Optional — Estimated number of SHACL shapes: __________________________
- Optional — Documents or binary artifacts stored per domain: __________________ [ ] GB [ ] TB
5. Knowledge Graph Builds
- Required — Number of graph builds per day: ____________________________
- Required — Build schedule: [ ] On demand [ ] Scheduled [ ] Both
- Required — Maximum simultaneous builds: ______________________________
- Required — Expected triples generated by a full build: __________________ [ ] million [ ] billion [ ] Unknown
- Required — Maximum acceptable full-build duration: _____________________
- Required — Build mode: [ ] Full rebuild [ ] Incremental [ ] Both [ ] To confirm
- Optional — Expected triples changed per incremental build: __________________ [ ] million [ ] billion
- Optional — Largest expected graph: __________________ [ ] million [ ] billion triples
- Optional — Reasoning or validation executed during each build: [ ] None [ ] OWL 2 RL [ ] SWRL [ ] SHACL
- Optional — Build-time availability requirement: [ ] Queries may pause [ ] Existing graph must remain queryable
If triple counts are unknown, provide representative source row counts and the expected number of entities, relationships, and attributes generated per row.
6. Graph Consumption
- Required — Consumption methods: [ ] OntoBricks Graph Viewer [ ] GraphQL API [ ] MCP [ ] SQL [ ] Other: __________________________
- Required — Peak interactive query rate: __________________ queries/second
- Required — Typical query rate: __________________ queries/second
- Required — Expected peak concurrent queries: __________________________
- Required — Typical query complexity: [ ] Point lookup [ ] One-hop traversal [ ] Multi-hop traversal [ ] Aggregation [ ] Mixed
- Required — Maximum acceptable interactive response time:
______________________________ - Optional — Typical result size: __________________ rows or objects
- Optional — Maximum traversal depth: __________________ hops
- Optional — Bulk exports: ______ exports/day of approximately __________________ [ ] MB [ ] GB each
- Optional — API traffic growth expected during the next 12 months: __________________ %
7. Lakebase Workload
OntoBricks uses Lakebase Autoscaling for its registry and graph storage.
- Required — Estimated graph storage at go-live: __________________ [ ] GB [ ] TB [ ] Unknown
- Required — Estimated graph storage after 12 months: __________________ [ ] GB [ ] TB [ ] Unknown
- Required — Peak Lakebase query rate: __________________ queries/second [ ] Unknown
- Required — Workload balance: ______ % reads / ______ % writes
- Required — Required daily availability: __________________ hours/day
- Optional — Required rollback or recovery retention: __________________ days
- Optional — Largest expected write burst: __________________ rows/second
- Optional — Known connection limit or connection-pooling constraints:
______________________________
8. SQL Warehouse Workload
OntoBricks uses a Databricks SQL Warehouse for Unity Catalog queries and Delta-backed operations.
- Required — Existing SQL Warehouse available: [ ] Yes [ ] No [ ] To be provisioned
- Required — Warehouse may be shared with other workloads: [ ] Yes [ ] No
- Required — Expected OntoBricks warehouse activity: ______ hours/day, ______ days/week
- Required — Maximum concurrent OntoBricks SQL statements:
______________________________ - Required — Largest data volume scanned by one operation: __________________ [ ] GB [ ] TB [ ] Unknown
- Optional — Preferred warehouse type: [ ] Serverless [ ] Pro [ ] Classic [ ] No preference
- Optional — Existing warehouse size and scaling range:
______________________________ - Optional — Auto-stop requirement: __________________ minutes
9. Databricks Apps and MCP
A standard deployment contains the OntoBricks application and an optional MCP companion application.
- Required — MCP server required: [ ] Yes [ ] No [ ] To confirm
- Required — Expected app usage: ______ hours/day, ______ days/week
- Required — Peak simultaneous browser sessions: ________________________
- Optional — Peak simultaneous MCP sessions: ____________________________
- Optional — App compute preference: [ ] Medium [ ] Large [ ] Let the sizing team recommend
- Optional — High availability or minimum replica requirement:
______________________________ - Optional — External systems calling OntoBricks APIs:
______________________________
10. AI-Assisted Features
Complete this section only if OntoBricks AI-assisted design or automation features will be enabled. Foundation Model API consumption must be estimated separately from the core Databricks compute estimate.
- Required — AI-assisted features enabled: [ ] Yes [ ] No
- If yes — Features used: [ ] Ontology generation [ ] Mapping generation [ ] Automated assignment [ ] Other: ______________________________
- If yes — Expected requests per day: ______________________________
- If yes — Peak simultaneous requests: ______________________________
- Optional — Typical input size: __________________ tokens or __________________ characters
- Optional — Typical output size: __________________ tokens
- Optional — Required model or serving endpoint: ________________________
- Optional — Data residency or model governance constraints:
______________________________
11. Service Levels, Security, and Growth
- Required — Production availability target: ____________________________
- Required — Recovery time objective (RTO): _____________________________
- Required — Recovery point objective (RPO): ____________________________
- Required — Expected data growth over 12 months: _____________________ %
- Required — Expected query growth over 12 months: ____________________ %
- Required — Expected graph-build growth over 12 months: ______________ %
- Optional — Network requirements: [ ] Public workspace connectivity [ ] Private Link [ ] IP access lists [ ] Other: ______________________
- Optional — Customer-managed keys required: [ ] Yes [ ] No
- Optional — Audit-log retention requirement: ___________________________
- Optional — Planned traffic peaks or seasonal events:
______________________________
12. Representative Performance Sample
When possible, provide a representative production sample or benchmark:
- Source data volume: ______________________________
- Source row count: ______________________________
- Ontology and mapping used: ______________________________
- Generated triple count: ______________________________
- Full-build duration: ______________________________
- Incremental-build duration: ______________________________
- Peak memory or compute observed: ______________________________
- Typical query and measured latency: ______________________________
- Environment where the measurement was taken: ____________________________
13. Additional Context
- Current solution being replaced or complemented:
______________________________ - Known bottlenecks or performance concerns:
______________________________ - Constraints not covered above:
______________________________ - Additional comments:
______________________________
14. Sizing Summary — For the Sizing Team
The customer may leave this section blank.
- Recommended Databricks App compute: ______________________________
- Recommended MCP App compute: ______________________________
- Recommended Lakebase capacity and storage: _____________________________
- Recommended SQL Warehouse type, size, and scaling range:
______________________________ - Estimated monthly workload by component: ______________________________
- Foundation Model API estimate, if applicable: __________________________
- Growth headroom applied: ______________________________ %
- Key assumptions: ______________________________
- Exclusions: ______________________________
- Confidence level: [ ] Low [ ] Moderate [ ] High
- Reassessment trigger: ______________________________