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 by deploy.sh before deployment.

MLflow Tracing

VariableValueDescription
MLFLOW_TRACKING_URIdatabricksMLflow tracking server (Databricks workspace)
MLFLOW_REGISTRY_URIdatabricks-ucMLflow model registry (Unity Catalog)
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 are used by deploy.sh and install.sh at deploy time. They are not injected into the app runtime directly — instead, deploy scripts use them to patch app.yaml placeholders and configure resources.

VariableRequiredDefaultDescription
GENIE_WAREHOUSE_IDYesSQL Warehouse ID (hex string from warehouse URL or detail page)
GENIE_CATALOGYesUnity 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. install.sh collects values and writes .env.deploy
  2. deploy.sh reads .env.deploy and patches __PLACEHOLDER__ strings in app.yaml
  3. databricks apps deploy 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