Skip to main content

Environment Variables

App Environment Variables (app.yaml)​

These variables are defined in app.yaml and injected into the app runtime. Placeholder values (e.g., __GSO_CATALOG__) are patched before deployment — by notebooks/install.py into its generated workspace source folder (recommended path), or in place by deploy.sh (local terminal path).

MLflow Tracing​

VariableValueDescription
MLFLOW_TRACKING_URIdatabricksMLflow tracking server (Databricks workspace)
MLFLOW_EXPERIMENT_ID__MLFLOW_EXPERIMENT_ID__Experiment for tracing LLM calls. Workspace-specific; validated at startup, cleared if invalid

LLM Model​

VariableValueDescription
LLM_MODEL__LLM_MODEL__Databricks model serving endpoint for analysis and the create agent. Default: databricks-claude-sonnet-4-6

SQL Warehouse​

VariableSourceDescription
SQL_WAREHOUSE_IDvalueFrom: sql-warehouseSQL Warehouse ID, pulled from the app resource named sql-warehouse

Genie Agent Configuration​

VariableValueDescription
GENIE_TARGET_DIRECTORY/Shared/Where new Genie Agents are created. Override to a specific folder if needed

Local Development​

VariableValueDescription
DEV_USER_EMAIL(empty)User email for local dev auth. Only used when running outside Databricks Apps

Lakebase PostgreSQL​

VariableSourceDescription
LAKEBASE_HOSTvalueFrom: postgresHostname, injected from the postgres app resource
LAKEBASE_PORT5432PostgreSQL port
LAKEBASE_DATABASEdatabricks_postgresDatabase name (standard Lakebase default)
LAKEBASE_INSTANCE_NAME__LAKEBASE_INSTANCE__Lakebase Autoscaling project name (patched by deploy script)

Auto-Optimize (GSO Engine)​

VariableSourceDescription
GSO_CATALOG__GSO_CATALOG__Unity Catalog for optimizer state tables. Patched from .env.deploy
GSO_SCHEMAgenie_space_optimizerSchema within the catalog for GSO tables (fixed name)
GSO_JOB_ID__GSO_JOB_ID__Databricks Job ID for the optimization DAG. Patched from bundle deploy state
GSO_WAREHOUSE_IDvalueFrom: sql-warehouseSQL Warehouse for GSO queries

Deploy Configuration Variables (.env.deploy)​

These variables apply to the local terminal path only — they are read by deploy.sh and written by install.sh. They are not injected into the app runtime directly; the deploy scripts use them to patch app.yaml placeholders and configure resources.

On the recommended notebook path there is no .env.deploy file. The equivalent values come from notebooks/install.py widgets (app_name, catalog, warehouse_id, lakebase_mode, lakebase_project_name).

VariableRequiredDefaultDescription
GENIE_WAREHOUSE_IDYes—SQL Warehouse ID (hex string from warehouse URL or detail page)
GENIE_CATALOGYes—Unity Catalog name (you need CREATE SCHEMA permission)
GENIE_APP_NAMENogenie-workbenchDatabricks App name (must be unique in your workspace)
GENIE_DEPLOY_PROFILENoDEFAULTDatabricks CLI profile name
GENIE_LLM_MODELNodatabricks-claude-sonnet-4-6LLM serving endpoint for analysis
GENIE_LAKEBASE_INSTANCENo<app-name>Lakebase Autoscaling project name (auto-provisioned by deploy)

How Variables Flow​

  1. The installer collects values — notebook widgets on the notebook path, or install.sh writing .env.deploy on the terminal path
  2. The installer patches __PLACEHOLDER__ strings in app.yaml. The notebook path writes the patched copy into its generated workspace source folder and leaves the Git folder's app.yaml untouched; the terminal path patches the file in place
  3. databricks apps deploy (or the notebook's equivalent SDK call) uploads the patched app.yaml
  4. The Databricks Apps platform injects env vars into the running container
  5. valueFrom variables (e.g., LAKEBASE_HOST, SQL_WAREHOUSE_ID) are resolved from app resources at runtime