Skip to content

Commit 3585656

Browse files
evabilskimtcarlonemichelley-anmichlyanllifoawing
authored
Update from upstream (#7)
Co-authored-by: Michael Carlone <[email protected]> Co-authored-by: michelley-an <[email protected]> Co-authored-by: Michelle Yan <[email protected]> Co-authored-by: Laura Li Foa Wing <[email protected]> Co-authored-by: Laura Li Foa Wing <[email protected]> Co-authored-by: Joseph Lozano <[email protected]> Co-authored-by: Michael Carlone <[email protected]> Co-authored-by: Jean-Vincent D'ADDA <[email protected]>
1 parent fcaaadf commit 3585656

File tree

9 files changed

+194
-27
lines changed

9 files changed

+194
-27
lines changed

.github/workflows/ci_lint_package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
architecture: "x64"
5151

5252
- name: Install Python packages
53-
run: python -m pip install dbt-snowflake~=1.8.0 sqlfluff-templater-dbt~=3.0.0
53+
run: python -m pip install dbt-snowflake~=1.9.0 sqlfluff-templater-dbt~=3.0.0
5454

5555
- name: Test database connection
5656
run: dbt debug

.github/workflows/ci_test_package.yml

Lines changed: 82 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env:
2121
DBT_ENV_SECRET_DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }}
2222
DBT_ENV_SECRET_GCP_PROJECT: ${{ secrets.GCP_PROJECT }}
2323
# Env var to test version
24-
LAST_RELEASE_SUPPORTED_DBT_VERSION: 1_8_0 # A dbt version supported by both the last release and this one
24+
LAST_RELEASE_SUPPORTED_DBT_VERSION: 1_9_0 # A dbt version supported by both the last release and this one
2525
# Env vars to test invocations model
2626
DBT_CLOUD_PROJECT_ID: 123
2727
DBT_CLOUD_JOB_ID: ABC
@@ -74,7 +74,7 @@ jobs:
7474

7575
- uses: actions/setup-python@v4
7676
with:
77-
python-version: "3.8.x"
77+
python-version: "3.9.x"
7878
architecture: "x64"
7979

8080
- name: Install tox
@@ -115,7 +115,7 @@ jobs:
115115
matrix:
116116
warehouse: ["snowflake", "bigquery", "postgres", "sqlserver"]
117117
# When supporting a new version, update the list here
118-
version: ["1_3_0", "1_4_0", "1_5_0", "1_6_0", "1_7_0", "1_8_0"]
118+
version: ["1_3_0", "1_4_0", "1_5_0", "1_6_0", "1_7_0", "1_8_0", "1_9_0"]
119119
runs-on: ubuntu-latest
120120
environment:
121121
name: Approve Integration Tests
@@ -139,7 +139,7 @@ jobs:
139139
steps:
140140
- uses: actions/setup-python@v4
141141
with:
142-
python-version: "3.8.x"
142+
python-version: "3.9.x"
143143
architecture: "x64"
144144

145145
- name: Install tox
@@ -193,3 +193,81 @@ jobs:
193193
# env:
194194
# DBT_VERSION: ''
195195
# run: tox -e integration_databricks
196+
197+
integration-sqlserver:
198+
strategy:
199+
fail-fast: false # Don't fail one DWH if the others fail
200+
runs-on: ubuntu-latest
201+
environment:
202+
name: Approve Integration Tests
203+
204+
steps:
205+
- uses: actions/setup-python@v4
206+
with:
207+
python-version: "3.9.x"
208+
architecture: "x64"
209+
- name: Install SQL Server
210+
uses: Particular/[email protected]
211+
with:
212+
connection-string-env-var: SQL_SERVER_CONNECTION_STRING
213+
catalog: dbt_artifact_integrationtests
214+
- name: Create DBT User
215+
shell: pwsh
216+
run: |
217+
echo "Create dbt login with sysadmin"
218+
sqlcmd -Q "CREATE LOGIN dbt WITH PASSWORD = '123', CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF" -d "dbt_artifact_integrationtests"
219+
sqlcmd -Q "ALTER SERVER ROLE sysadmin ADD MEMBER dbt" -d "dbt_artifact_integrationtests"
220+
- name: Install tox
221+
run: python3 -m pip install tox
222+
223+
- name: Install Microsoft ODBC
224+
run: sudo ACCEPT_EULA=Y apt-get install msodbcsql18 -y
225+
226+
- name: Checkout
227+
uses: actions/checkout@v3
228+
with:
229+
ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR
230+
231+
- name: Run Tests on PR
232+
env:
233+
DBT_VERSION: ${{ matrix.version }}
234+
run: tox -e integration_sqlserver
235+
236+
integration-sqlserver-single-run:
237+
strategy:
238+
fail-fast: false # Don't fail one DWH if the others fail
239+
matrix:
240+
# When supporting a new version, update the list here
241+
version: ["1_3_0", "1_4_0", "1_7_0", "1_8_0"]
242+
runs-on: ubuntu-latest
243+
environment:
244+
name: Approve Integration Tests
245+
246+
steps:
247+
- uses: actions/setup-python@v4
248+
with:
249+
python-version: "3.9.x"
250+
architecture: "x64"
251+
- name: Install SQL Server
252+
uses: Particular/[email protected]
253+
with:
254+
connection-string-env-var: SQL_SERVER_CONNECTION_STRING
255+
catalog: dbt_artifact_integrationtests
256+
- name: Create DBT User
257+
shell: pwsh
258+
run: |
259+
echo "Create dbt login with sysadmin"
260+
sqlcmd -Q "CREATE LOGIN dbt WITH PASSWORD = '123', CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF" -d "dbt_artifact_integrationtests"
261+
sqlcmd -Q "ALTER SERVER ROLE sysadmin ADD MEMBER dbt" -d "dbt_artifact_integrationtests"
262+
- name: Install tox
263+
run: python3 -m pip install tox
264+
- name: Install Microsoft ODBC
265+
run: sudo ACCEPT_EULA=Y apt-get install msodbcsql18 -y
266+
- name: Checkout
267+
uses: actions/checkout@v3
268+
with:
269+
ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR
270+
- name: Run Tests on PR
271+
env:
272+
DBT_VERSION: ${{ matrix.version }}
273+
run: tox -e integration_sqlserver_${{ matrix.version }}

.github/workflows/main_lint_package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
architecture: "x64"
4747

4848
- name: Install Python packages
49-
run: python -m pip install dbt-snowflake~=1.8.0 sqlfluff-templater-dbt~=3.0.0
49+
run: python -m pip install dbt-snowflake~=1.9.0 sqlfluff-templater-dbt~=3.0.0
5050

5151
- name: Test database connection
5252
run: dbt debug

.github/workflows/main_test_package.yml

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ jobs:
3434
integration:
3535
strategy:
3636
matrix:
37-
warehouse: ["snowflake", "bigquery", "postgres", "sqlserver"]
38-
version: ["1_3_0", "1_4_0", "1_5_0", "1_6_0", "1_7_0", "1_8_0"]
37+
warehouse: ["snowflake", "bigquery", "postgres"]
38+
version: ["1_3_0", "1_4_0", "1_5_0", "1_6_0", "1_7_0", "1_8_0", "1_9_0"]
3939
runs-on: ubuntu-latest
4040
permissions:
4141
contents: "read"
@@ -60,7 +60,7 @@ jobs:
6060

6161
- uses: actions/setup-python@v4
6262
with:
63-
python-version: "3.8.x"
63+
python-version: "3.9.x"
6464
architecture: "x64"
6565

6666
- name: Install tox
@@ -102,3 +102,45 @@ jobs:
102102

103103
# - name: Run Databricks Tests
104104
# run: tox -e integration_databricks
105+
106+
integration-sqlserver:
107+
strategy:
108+
fail-fast: false # Don't fail one DWH if the others fail
109+
matrix:
110+
# When supporting a new version, update the list here
111+
version: ["1_3_0", "1_4_0", "1_7_0", "1_8_0"]
112+
runs-on: ubuntu-latest
113+
environment:
114+
name: Approve Integration Tests
115+
116+
steps:
117+
- uses: actions/setup-python@v4
118+
with:
119+
python-version: "3.9.x"
120+
architecture: "x64"
121+
- name: Install SQL Server
122+
uses: Particular/[email protected]
123+
with:
124+
connection-string-env-var: SQL_SERVER_CONNECTION_STRING
125+
catalog: dbt_artifact_integrationtests
126+
- name: Create DBT User
127+
shell: pwsh
128+
run: |
129+
echo "Create dbt login with sysadmin"
130+
sqlcmd -Q "CREATE LOGIN dbt WITH PASSWORD = '123', CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF" -d "dbt_artifact_integrationtests"
131+
sqlcmd -Q "ALTER SERVER ROLE sysadmin ADD MEMBER dbt" -d "dbt_artifact_integrationtests"
132+
- name: Install tox
133+
run: python3 -m pip install tox
134+
135+
- name: Install Microsoft ODBC
136+
run: sudo ACCEPT_EULA=Y apt-get install msodbcsql18 -y
137+
138+
- name: Checkout
139+
uses: actions/checkout@v3
140+
with:
141+
ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR
142+
143+
- name: Run Tests on PR
144+
env:
145+
DBT_VERSION: ${{ matrix.version }}
146+
run: tox -e integration_sqlserver_${{ matrix.version }}

.github/workflows/publish_docs_on_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
uses: actions/checkout@v3
4040

4141
- name: Install Python packages
42-
run: python -m pip install dbt-snowflake~=1.8.0
42+
run: python -m pip install dbt-snowflake~=1.9.0
4343

4444
- name: Test database connection
4545
run: dbt debug

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ See the generated [dbt docs site](https://brooklyn-data.github.io/dbt_artifacts/
4747
```
4848
packages:
4949
- package: brooklyn-data/dbt_artifacts
50-
version: 2.6.4
50+
version: 2.8.0
5151
```
5252

5353
:construction_worker: Make sure to fix at least the **minor** version, to avoid issues when a new release is open. See the notes on upgrading below for more detail.

dbt_project.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: "dbt_artifacts"
2-
version: "2.6.4"
2+
version: "2.8.0"
33
config-version: 2
4-
require-dbt-version: [">=1.3.0", "<1.9.0"]
4+
require-dbt-version: [">=1.3.0", "<1.10.0"]
55
profile: "dbt_artifacts"
66

77
clean-targets: # folders to be removed by `dbt clean`

integration_test_project/profiles.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,6 @@ dbt_artifacts:
6161
schema: dbo
6262
windows_login: False
6363
trust_cert: True
64-
user: sa
64+
Encrypt: False
65+
user: dbt
6566
password: "123"

tox.ini

Lines changed: 59 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,13 @@ commands = sqlfluff fix models --ignore parsing
113113

114114
# Generate docs
115115
[testenv:generate_docs]
116-
deps = dbt-snowflake~=1.8.0
116+
deps = dbt-snowflake~=1.9.0
117117
commands = dbt docs generate --profiles-dir integration_test_project
118118

119119
# Snowflake integration tests
120120
[testenv:integration_snowflake]
121121
changedir = integration_test_project
122-
deps = dbt-snowflake~=1.8.0
122+
deps = dbt-snowflake~=1.9.0
123123
commands =
124124
dbt clean
125125
dbt deps
@@ -174,10 +174,18 @@ commands =
174174
dbt deps
175175
dbt build --target snowflake
176176

177+
[testenv:integration_snowflake_1_9_0]
178+
changedir = integration_test_project
179+
deps = dbt-snowflake~=1.9.0
180+
commands =
181+
dbt clean
182+
dbt deps
183+
dbt build --target snowflake
184+
177185
# Databricks integration tests
178186
[testenv:integration_databricks]
179187
changedir = integration_test_project
180-
deps = dbt-databricks~=1.8.0
188+
deps = dbt-databricks~=1.9.0
181189
commands =
182190
dbt clean
183191
dbt deps
@@ -231,10 +239,18 @@ commands =
231239
dbt deps
232240
dbt build --target databricks
233241

242+
[testenv:integration_databricks_1_9_0]
243+
changedir = integration_test_project
244+
deps = dbt-databricks~=1.9.0
245+
commands =
246+
dbt clean
247+
dbt deps
248+
dbt build --target databricks
249+
234250
# Bigquery integration tests
235251
[testenv:integration_bigquery]
236252
changedir = integration_test_project
237-
deps = dbt-bigquery~=1.8.0
253+
deps = dbt-bigquery~=1.9.0
238254
commands =
239255
dbt clean
240256
dbt deps
@@ -288,6 +304,14 @@ commands =
288304
dbt deps
289305
dbt build --target bigquery --vars '"my_var": "my value"'
290306

307+
[testenv:integration_bigquery_1_9_0]
308+
changedir = integration_test_project
309+
deps = dbt-bigquery~=1.9.0
310+
commands =
311+
dbt clean
312+
dbt deps
313+
dbt build --target bigquery --vars '"my_var": "my value"'
314+
291315
# Spark integration test (disabled)
292316
[testenv:integration_spark]
293317
changedir = integration_test_project
@@ -299,7 +323,9 @@ commands =
299323

300324
[testenv:integration_postgres]
301325
changedir = integration_test_project
302-
deps = dbt-postgres~=1.8.0
326+
deps =
327+
dbt-core~=1.9.0
328+
dbt-postgres~=1.9.0
303329
commands =
304330
dbt clean
305331
dbt deps
@@ -347,39 +373,59 @@ commands =
347373

348374
[testenv:integration_postgres_1_8_0]
349375
changedir = integration_test_project
350-
deps = dbt-postgres~=1.7.0
376+
deps =
377+
dbt-core~=1.8.0
378+
dbt-postgres~=1.8.0
379+
commands =
380+
dbt clean
381+
dbt deps
382+
dbt build --target postgres
383+
384+
[testenv:integration_postgres_1_9_0]
385+
changedir = integration_test_project
386+
deps =
387+
dbt-core~=1.9.0
388+
dbt-postgres~=1.9.0
351389
commands =
352390
dbt clean
353391
dbt deps
354392
dbt build --target postgres
355393

356394
[testenv:integration_sqlserver]
357395
changedir = integration_test_project
358-
deps = dbt-sqlserver~=1.8.4
396+
deps = dbt-sqlserver~=1.8.0
397+
commands =
398+
dbt clean
399+
dbt deps
400+
dbt build --target sqlserver
401+
402+
[testenv:integration_sqlserver_1_3_0]
403+
changedir = integration_test_project
404+
deps = dbt-sqlserver~=1.3.0
359405
commands =
360406
dbt clean
361407
dbt deps
362408
dbt build --target sqlserver
363409

364-
[testenv:integration_sqlserver_1_4_3]
410+
[testenv:integration_sqlserver_1_4_0]
365411
changedir = integration_test_project
366-
deps = dbt-sqlserver~=1.4.3
412+
deps = dbt-sqlserver~=1.4.0
367413
commands =
368414
dbt clean
369415
dbt deps
370416
dbt build --target sqlserver
371417

372-
[testenv:integration_sqlserver_1_7_4]
418+
[testenv:integration_sqlserver_1_7_0]
373419
changedir = integration_test_project
374-
deps = dbt-sqlserver~=1.7.4
420+
deps = dbt-sqlserver~=1.7.0
375421
commands =
376422
dbt clean
377423
dbt deps
378424
dbt build --target sqlserver
379425

380-
[testenv:integration_sqlserver_1_8_4]
426+
[testenv:integration_sqlserver_1_8_0]
381427
changedir = integration_test_project
382-
deps = dbt-sqlserver~=1.8.4
428+
deps = dbt-sqlserver~=1.8.0
383429
commands =
384430
dbt clean
385431
dbt deps

0 commit comments

Comments
 (0)