dbt-labs/dbt-core

[FEAT] Support Databricks M2M SP Oauth on Azure

Open

#13,986 建立於 2025年11月12日

在 GitHub 查看
 (15 留言) (0 反應) (0 負責人)Python (1,403 fork)batch import
ConformanceOAuthdatabricksenhancementhelp wantedtriagev2

倉庫指標

Star
 (7,989 star)
PR 合併指標
 (平均合併 2天 13小時) (30 天內合併 46 個 PR)

描述

Is your feature request related to a problem? Please describe.

related: https://github.com/dbt-labs/dbt-core/issues/13291

We are blocked from using Fusion in non-dev environment for dbt platform by the missing (Azure) Databricks M2M Oauth authentication (Service principal authentication). See documentation here for Azure on dbt-databricks: https://learn.microsoft.com/en-us/azure/databricks/integrations/configure-oauth-dbt#add-the-m2m-profile-to-your-dbt-project

Is your feature request related to a particular component of the dbt Fusion Engine

  • CLI Features
  • Adapter or Database Driver Features
  • SQL Understanding Features
  • VS Code extension

Describe the solution you'd like Working Oauth M2M for (Azure) Databricks

Describe alternatives you've considered PAT token authentication which is the only alternative for Fusion on Databricks is not something that we want to use for sensitive production data.

Additional context When using extended attributes that work in dbt core latest:

auth_type: oauth
client_id: '{{ env_var(''DBT_ENV_SP_CLIENT_ID'') }}'
client_secret: '{{ env_var(''DBT_ENV_SECRET_SP_CLIENT_SECRET'') }}'
type: databricks

or as latest non-deprecated definition for Azure Databricks from dbt core:

auth_type: oauth
azure_client_id: '{{ env_var(''DBT_ENV_SP_CLIENT_ID'') }}'
azure_client_secret: '{{ env_var(''DBT_ENV_SECRET_SP_CLIENT_SECRET'') }}'
type: databricks

We get the following two errors in dbt platform using Fusion latest (dbt-fusion 2.0.0-preview.63):

error: dbt9002: Unexpected Result: execution error: [Databricks] [Databricks] failed to execute statement: failed during request visitor: pat auth: not configured. Config: host=https://adb-xxxxxxxxxxxxxxx.azuredatabricks.net, warehouse_id=1234567891234
(in :2:3)
(in dbt_internal_packages/dbt-spark/macros/adapters.sql:278:12)
(in dbt_internal_packages/dbt-adapters/macros/etc/statement.sql:14:35)

Or:

error: dbt9002: Unexpected Result: execution error: [Databricks] [Databricks] failed to execute statement: Credential was not sent or was of an unsupported type for this API. [ReqId: 123456890]
(in :2:3)
(in dbt_internal_packages/dbt-spark/macros/adapters.sql:278:12)
(in dbt_internal_packages/dbt-adapters/macros/etc/statement.sql:14:35)

貢獻者指南