You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: self-host/customize-deployment/environment-variables.mdx
+49-2Lines changed: 49 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -584,8 +584,8 @@ The admin, organization, and API key variables from [Initialize instance](#initi
584
584
|`catalog`| No | Unity Catalog name. |
585
585
|`authenticationType`| No | One of `personal_access_token` (default), `oauth_m2m`, `oauth_u2m`. |
586
586
|`personalAccessToken`| If `authenticationType=personal_access_token`| Databricks PAT (starts with `dapi_`). |
587
-
|`oauthClientId`| If `authenticationType=oauth_m2m`| Service Principal client ID. |
588
-
|`oauthClientSecret`| If `authenticationType=oauth_m2m`| Service Principal client secret.|
587
+
|`oauthClientId`| If `authenticationType=oauth_m2m`|Databricks Service Principal client ID (a UUID).|
588
+
|`oauthClientSecret`| If `authenticationType=oauth_m2m`|Databricks Service Principal client secret. |
589
589
|`compute`| No | Array of extra SQL warehouses: `[{ "name": "...", "httpPath": "..." }]`. |
590
590
|`startOfWeek`| No | Day to use as start of week (default=`SUNDAY`). |
591
591
|`dataTimezone`| No | Project-level timezone override. |
@@ -649,6 +649,53 @@ export LD_SETUP_PROJECTS='[
649
649
**Quote the whole value in single quotes** in your shell so that `$`, backticks, and double quotes inside the JSON are not re-interpreted. When injecting via a secret manager or Kubernetes `Secret`, no escaping is needed — just paste the JSON as-is.
650
650
</Note>
651
651
652
+
### Databricks M2M OAuth example
653
+
654
+
Use a [Databricks Service Principal](https://docs.databricks.com/aws/en/dev-tools/auth/oauth-m2m) when you want non-interactive, machine-to-machine authentication instead of a PAT. Lightdash exchanges the `client_id` + `client_secret` for an access token automatically on the first compile and refreshes it as needed — no user interaction is required.
If you already have an M2M Service Principal configured for dbt, the field names are different. Map your dbt profile fields to Lightdash's `warehouseConnection` like this:
M2M is non-interactive by design — Lightdash uses the OAuth client-credentials grant. No browser popup, no per-user sign-in. The Service Principal needs `CAN USE` on the SQL warehouse and the appropriate `SELECT`/`USE CATALOG`/`USE SCHEMA` grants on your data.
697
+
</Note>
698
+
652
699
### Validation
653
700
654
701
`LD_SETUP_PROJECTS` is parsed and validated at boot. Lightdash will **fail to start with a descriptive error** if any of the following are true:
0 commit comments