Skip to content

Commit cfc9b68

Browse files
fix: use cloud auth (ServicePrincipal) for fabric profile, keep sqlserver as Docker target
dbt-fabric only supports Azure AD authentication methods and cannot connect to a local SQL Server Docker container with SQL auth. Move fabric from Docker targets to cloud targets using ServicePrincipal authentication (matching the dbt-data-reliability configuration). Co-Authored-By: Itamar Hartstein <haritamar@gmail.com>
1 parent ba52254 commit cfc9b68

2 files changed

Lines changed: 17 additions & 14 deletions

File tree

.github/workflows/test-warehouse.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ jobs:
162162
docker compose up -d --build --wait spark-thrift
163163
164164
- name: Start SQL Server
165-
if: inputs.warehouse-type == 'fabric' || inputs.warehouse-type == 'sqlserver'
165+
if: inputs.warehouse-type == 'sqlserver'
166166
working-directory: ${{ env.E2E_DBT_PROJECT_DIR }}
167167
run: |
168168
docker compose up -d sqlserver
@@ -205,7 +205,7 @@ jobs:
205205
# This enables caching the seeded database state between runs.
206206
IS_DOCKER=false
207207
case "${{ inputs.warehouse-type }}" in
208-
postgres|clickhouse|trino|dremio|duckdb|spark|fabric|sqlserver) IS_DOCKER=true ;;
208+
postgres|clickhouse|trino|dremio|duckdb|spark|sqlserver) IS_DOCKER=true ;;
209209
esac
210210
211211
if [ "$IS_DOCKER" = "true" ]; then

tests/profiles/profiles.yml.j2

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,6 @@ elementary_tests:
6060
file_format: delta
6161
threads: 4
6262

63-
fabric: &fabric
64-
type: fabric
65-
driver: "ODBC Driver 18 for SQL Server"
66-
server: 127.0.0.1
67-
port: 1433
68-
database: master
69-
schema: {{ schema_name }}
70-
user: sa
71-
password: "Elementary123!"
72-
trust_cert: true
73-
threads: 4
74-
7563
sqlserver: &sqlserver
7664
type: sqlserver
7765
driver: "ODBC Driver 18 for SQL Server"
@@ -87,6 +75,21 @@ elementary_tests:
8775

8876
# ── Cloud targets (secrets substituted at CI time) ─────────────────
8977

78+
fabric: &fabric
79+
type: fabric
80+
driver: "ODBC Driver 18 for SQL Server"
81+
server: {{ fabric_server | toyaml }}
82+
port: 1433
83+
database: {{ fabric_database | toyaml }}
84+
schema: {{ schema_name }}
85+
authentication: ServicePrincipal
86+
tenant_id: {{ fabric_tenant_id | toyaml }}
87+
client_id: {{ fabric_client_id | toyaml }}
88+
client_secret: {{ fabric_client_secret | toyaml }}
89+
encrypt: true
90+
trust_cert: false
91+
threads: 4
92+
9093
snowflake: &snowflake
9194
type: snowflake
9295
account: {{ snowflake_account | toyaml }}

0 commit comments

Comments
 (0)