Databricks recipes (`fh add`)
Scaffold Lakebase, SQL, Vector Search, Lakeflow, Jobs, cost controls, and Apps wiring with managed Fabric Harness recipes.
Use managed Databricks recipes to wire @fabric-harness/databricks into an existing project without copying examples by hand. Recipes write versioned files under .fabricharness/databricks/ (or a job for the analyst composite), update dependencies, and leave secrets in environment variables.
Greenfield projects can still start with:
fh init --template databricksRecipes are for adding one product surface (or a small workload composite) afterward.
Generated Databricks recipes default to DATABRICKS_MODEL=system.ai.gpt-oss-20b and
DATABRICKS_INFERENCE_MODE=auto. Set DATABRICKS_HOST to the workspace origin, for example
https://<workspace-host>; do not include /ai-gateway/mlflow/v1 in the host value.
List and install
fh add
fh add --json
fh add databricks core
fh add databricks sql
fh add lakebase # alias
fh add vector-search
fh add lakeflow
fh add jobs
fh add system-tables-cost
fh add apps
fh add lakehouse # analyst composite (sql + tables)
fh add databricks lakebase --dry-run
fh update databricks sqlCatalog
| Recipe | Alias examples | Managed files | Dependencies | Maps to |
|---|---|---|---|---|
core | databricks-core | databricks/identity.ts, policies/databricks.ts | @fabric-harness/databricks | Workspace identity + UC egress policy |
sql | databricks-sql | databricks/sql.ts | @fabric-harness/databricks | SQL Warehouse + table discovery |
lakebase | databricks-lakebase | databricks/lakebase.ts | @fabric-harness/databricks, pg | Lakebase persistence |
vector-search | databricks-rag | databricks/vector-search.ts | @fabric-harness/databricks | Agentic search tool bundle |
rag-chain | databricks-rag-chain | databricks/rag-chain.ts, jobs/rag-answer.ts | @fabric-harness/databricks | Cookbook online chain + MLflow 3 eval export (RAG docs) |
lakeflow | databricks-dataeng | databricks/lakeflow.ts | @fabric-harness/databricks | with-databricks-dataeng |
jobs | databricks-compute | databricks/jobs.ts | @fabric-harness/databricks | with-databricks-compute |
system-tables-cost | databricks-cost | databricks/cost.ts | @fabric-harness/databricks | with-databricks-cost-attribution |
apps | databricks-app | databricks/apps.ts | @fabric-harness/databricks, @fabric-harness/node | Apps runtime preset + deploy targets |
analyst | lakehouse | jobs/databricks-analyst.ts | @fabric-harness/databricks | init template / simple analyst job |
“Lakehouse” is an alias for the analyst composite (governed SQL + UC tools), not a separate Databricks SDK product.
Typical flows
SQL analyst on Apps
fh init --template minimal
fh add databricks core
fh add databricks sql
fh add databricks analyst
# set DATABRICKS_* in .env
fh run databricks-analyst --question "What tables are in main?" --mock
fh build --target databricks-appRAG support agent
# Deterministic cookbook chain (retrieve → augment → generate):
fh add databricks rag-chain
fh run rag-answer --question "How do I reset my password?"
# Or agentic multi-tool search (SQL + search + …):
fh add vector-search
# Import createVectorSearchBundle() and pass modelProvider + tools into init()See RAG on Databricks for citation validation, MLflow 3 export, and the quality workflow.
Lakebase durable state
fh add lakebase
# In .fabricharness/config.ts:
# import { createLakebasePersistence } from './databricks/lakebase.js';
# persistence: createLakebasePersistence(),Data engineering
fh add lakeflow
fh add jobs
# Use createLakeflowBundle() / createDatabricksJobsTools() in agent initConventions
- Package owns behavior — recipes only wire
@fabric-harness/databricksinto your workspace. - Managed markers — files start with
// fabric-harness-recipe: databricks/<name>@1for safefh update. - No secrets in source — only env names are written to
.env.example. - Runnable verification — generated tests import from
../../.fabricharness/and are compiled by the recipe contract suite. - Merge config yourself — recipes do not silently rewrite
config.ts; they print paths and env requirements. - Deploy — Apps/Serving artifacts still come from
fh build --target databricks-app|databricks-serving.