FabricFabricHarness
Databricks

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 databricks

Recipes 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 sql

Catalog

RecipeAlias examplesManaged filesDependenciesMaps to
coredatabricks-coredatabricks/identity.ts, policies/databricks.ts@fabric-harness/databricksWorkspace identity + UC egress policy
sqldatabricks-sqldatabricks/sql.ts@fabric-harness/databricksSQL Warehouse + table discovery
lakebasedatabricks-lakebasedatabricks/lakebase.ts@fabric-harness/databricks, pgLakebase persistence
vector-searchdatabricks-ragdatabricks/vector-search.ts@fabric-harness/databricksAgentic search tool bundle
rag-chaindatabricks-rag-chaindatabricks/rag-chain.ts, jobs/rag-answer.ts@fabric-harness/databricksCookbook online chain + MLflow 3 eval export (RAG docs)
lakeflowdatabricks-dataengdatabricks/lakeflow.ts@fabric-harness/databrickswith-databricks-dataeng
jobsdatabricks-computedatabricks/jobs.ts@fabric-harness/databrickswith-databricks-compute
system-tables-costdatabricks-costdatabricks/cost.ts@fabric-harness/databrickswith-databricks-cost-attribution
appsdatabricks-appdatabricks/apps.ts@fabric-harness/databricks, @fabric-harness/nodeApps runtime preset + deploy targets
analystlakehousejobs/databricks-analyst.ts@fabric-harness/databricksinit 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-app

RAG 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 init

Conventions

  • Package owns behavior — recipes only wire @fabric-harness/databricks into your workspace.
  • Managed markers — files start with // fabric-harness-recipe: databricks/<name>@1 for safe fh 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.

See also