Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
publish-docker-client:
strategy:
matrix:
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python_version: ["3.10", "3.11", "3.12", "3.13"]
docker_target: ["msodbc17", "msodbc18", "mssql"]
runs-on: ubuntu-latest
permissions:
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ The same setting is also honoured via `vars:` for backwards compatibility; the b

[![Unit tests](https://github.com/dbt-msft/dbt-sqlserver/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/dbt-msft/dbt-sqlserver/actions/workflows/unit-tests.yml)
[![Integration tests on SQL Server](https://github.com/dbt-msft/dbt-sqlserver/actions/workflows/integration-tests-sqlserver.yml/badge.svg)](https://github.com/dbt-msft/dbt-sqlserver/actions/workflows/integration-tests-sqlserver.yml)
[![Integration tests on Azure](https://github.com/dbt-msft/dbt-sqlserver/actions/workflows/integration-tests-azure.yml/badge.svg)](https://github.com/dbt-msft/dbt-sqlserver/actions/workflows/integration-tests-azure.yml)

This adapter is community-maintained.
You are welcome to contribute by creating issues, opening or reviewing pull requests, or helping other users in the Slack channel.
Expand Down
10 changes: 5 additions & 5 deletions dbt/adapters/sqlserver/sqlserver_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from itertools import chain, repeat
from typing import TYPE_CHECKING, Any, Callable, Dict, Mapping, Optional, cast

import dbt_common.exceptions

from dbt.adapters.events.logging import AdapterLogger
from dbt.adapters.sqlserver.sqlserver_constants import (
AAD_TOKEN_AUTHENTICATIONS,
Expand Down Expand Up @@ -292,11 +294,9 @@ def get_pyodbc_attrs_before_credentials(credentials: SQLServerCredentials) -> Di

if authentication == "activedirectoryaccesstoken":
if credentials.access_token is None or credentials.access_token_expires_on is None:
raise ValueError(
(
"Access token and a non-zero access token expiry epoch timestamp are "
"required for ActiveDirectoryAccessToken authentication."
)
raise dbt_common.exceptions.DbtRuntimeError(
"Access token and a non-zero access token expiry epoch timestamp are "
"required for ActiveDirectoryAccessToken authentication."
)

if credentials.access_token_expires_on == 0:
Expand Down

This file was deleted.

3 changes: 0 additions & 3 deletions dbt/include/sqlserver/macros/relations/views/create.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
CREATE OR ALTER VIEW {{ relation.include(database=False) }} AS {{ sql }};
{% endset %}

{% set tst %}
SELECT '1' as col
{% endset %}
USE [{{ relation.database }}];
EXEC('{{- escape_single_quotes(query) -}}')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def test_get_pyodbc_attrs_before_active_directory_access_token_requires_expiry(
credentials.access_token = "some-token"

credentials.access_token_expires_on = None
with pytest.raises(ValueError, match="access token expiry"):
with pytest.raises(DbtRuntimeError, match="access token expiry"):
get_pyodbc_attrs_before_credentials(credentials)


Expand Down