Skip to content

Commit 5e67b89

Browse files
authored
Merge pull request #350 from dbt-msft/copy-for-workflow-schtuff
Copy for workflow schtuff
2 parents 4997c6c + 7cfc7c9 commit 5e67b89

File tree

15 files changed

+62
-24
lines changed

15 files changed

+62
-24
lines changed

.github/workflows/integration-tests-azure.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.ref_name == 'master' || github.ref_name == 'azure-testing'
1616
strategy:
1717
matrix:
18-
python_version: ["3.7", "3.8", "3.9", "3.10"]
18+
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1919
profile: ["ci_azure_cli", "ci_azure_auto", "ci_azure_environment", "ci_azure_basic"]
2020
msodbc_version: ["17", "18"]
2121
max-parallel: 1

.github/workflows/integration-tests-sqlserver.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: Integration tests on SQL Server
1616
strategy:
1717
matrix:
18-
python_version: ["3.7", "3.8", "3.9", "3.10"]
18+
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1919
msodbc_version: ["17", "18"]
2020
sqlserver_version: ["2017", "2019", "2022"]
2121
runs-on: ubuntu-latest

.github/workflows/publish-docker.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,18 @@ on: # yamllint disable-line rule:truthy
77
- '.github/workflows/publish-docker.yml'
88
branches:
99
- 'master'
10+
pull_request:
11+
paths:
12+
- 'devops/**'
13+
- '.github/workflows/publish-docker.yml'
14+
branches:
15+
- 'master'
1016

1117
jobs:
1218
publish-docker-client:
1319
strategy:
1420
matrix:
15-
python_version: ["3.7", "3.8", "3.9", "3.10"]
21+
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1622
docker_target: ["msodbc17", "msodbc18"]
1723
runs-on: ubuntu-latest
1824
permissions:

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: Unit tests
1616
strategy:
1717
matrix:
18-
python_version: ["3.7", "3.8", "3.9", "3.10"]
18+
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1919
runs-on: ubuntu-latest
2020
permissions:
2121
contents: read

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ repos:
6565
- '--target-version=py39'
6666
- '--check'
6767
- '--diff'
68-
- repo: 'https://gitlab.com/pycqa/flake8'
69-
rev: 3.9.2
68+
- repo: 'https://github.com/pycqa/flake8'
69+
rev: 6.0.0
7070
hooks:
7171
- id: flake8
7272
args:

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
### v1.4.0
4+
5+
#### Features
6+
7+
* Support for [dbt-core 1.4](https://github.com/dbt-labs/dbt-core/releases/tag/v1.4.1)
8+
* [Incremental predicates](https://docs.getdbt.com/docs/build/incremental-models#about-incremental_predicates) are currently not supported in this adapter
9+
* Add support for Python 3.11
10+
* Replace deprecated exception functions
11+
* Consolidate timestamp macros
12+
313
### v1.3.0
414

515
#### Features

dbt/adapters/sqlserver/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "1.3.1"
1+
version = "1.4.0"

dbt/adapters/sqlserver/sql_server_connection_manager.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,19 +250,19 @@ def exception_handler(self, sql):
250250
except pyodbc.Error:
251251
logger.debug("Failed to release connection!")
252252

253-
raise dbt.exceptions.DatabaseException(str(e).strip()) from e
253+
raise dbt.exceptions.DbtDatabaseError(str(e).strip()) from e
254254

255255
except Exception as e:
256256
logger.debug(f"Error running SQL: {sql}")
257257
logger.debug("Rolling back transaction.")
258258
self.release()
259-
if isinstance(e, dbt.exceptions.RuntimeException):
259+
if isinstance(e, dbt.exceptions.DbtRuntimeError):
260260
# during a sql query, an internal to dbt exception was raised.
261261
# this sounds a lot like a signal handler and probably has
262262
# useful information, so raise it without modification.
263263
raise
264264

265-
raise dbt.exceptions.RuntimeException(e)
265+
raise dbt.exceptions.DbtRuntimeError(e)
266266

267267
@classmethod
268268
def open(cls, connection: Connection) -> Connection:

dbt/include/sqlserver/macros/adapters/freshness.sql

Lines changed: 0 additions & 3 deletions
This file was deleted.

dbt/include/sqlserver/macros/materializations/models/incremental/merge.sql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
{{ default__get_merge_sql(target, source, unique_key, dest_columns, predicates) }};
1010
{% endmacro %}
1111

12-
{% macro sqlserver__get_delete_insert_merge_sql(target, source, unique_key, dest_columns) %}
12+
{% macro sqlserver__get_delete_insert_merge_sql(target, source, unique_key, dest_columns, incremental_predicates) %}
13+
{% if incremental_predicates %}
14+
{{ exceptions.raise_not_implemented('incremental_predicates are not implemented in dbt-sqlserver') }}
15+
{% endif %}
1316

1417
{%- set dest_cols_csv = get_quoted_csv(dest_columns | map(attribute="name")) -%}
1518

0 commit comments

Comments
 (0)