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/ci_lint_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
architecture: "x64"

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

- name: Test database connection
run: dbt debug
Expand Down
86 changes: 82 additions & 4 deletions .github/workflows/ci_test_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ env:
DBT_ENV_SECRET_DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }}
DBT_ENV_SECRET_GCP_PROJECT: ${{ secrets.GCP_PROJECT }}
# Env var to test version
LAST_RELEASE_SUPPORTED_DBT_VERSION: 1_8_0 # A dbt version supported by both the last release and this one
LAST_RELEASE_SUPPORTED_DBT_VERSION: 1_9_0 # A dbt version supported by both the last release and this one
# Env vars to test invocations model
DBT_CLOUD_PROJECT_ID: 123
DBT_CLOUD_JOB_ID: ABC
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: "3.8.x"
python-version: "3.9.x"
architecture: "x64"

- name: Install tox
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
matrix:
warehouse: ["snowflake", "bigquery", "postgres", "sqlserver"]
# When supporting a new version, update the list here
version: ["1_3_0", "1_4_0", "1_5_0", "1_6_0", "1_7_0", "1_8_0"]
version: ["1_3_0", "1_4_0", "1_5_0", "1_6_0", "1_7_0", "1_8_0", "1_9_0"]
runs-on: ubuntu-latest
environment:
name: Approve Integration Tests
Expand All @@ -139,7 +139,7 @@ jobs:
steps:
- uses: actions/setup-python@v4
with:
python-version: "3.8.x"
python-version: "3.9.x"
architecture: "x64"

- name: Install tox
Expand Down Expand Up @@ -193,3 +193,81 @@ jobs:
# env:
# DBT_VERSION: ''
# run: tox -e integration_databricks

integration-sqlserver:
strategy:
fail-fast: false # Don't fail one DWH if the others fail
runs-on: ubuntu-latest
environment:
name: Approve Integration Tests

steps:
- uses: actions/setup-python@v4
with:
python-version: "3.9.x"
architecture: "x64"
- name: Install SQL Server
uses: Particular/install-sql-server-action@v1.2.0
with:
connection-string-env-var: SQL_SERVER_CONNECTION_STRING
catalog: dbt_artifact_integrationtests
- name: Create DBT User
shell: pwsh
run: |
echo "Create dbt login with sysadmin"
sqlcmd -Q "CREATE LOGIN dbt WITH PASSWORD = '123', CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF" -d "dbt_artifact_integrationtests"
sqlcmd -Q "ALTER SERVER ROLE sysadmin ADD MEMBER dbt" -d "dbt_artifact_integrationtests"
- name: Install tox
run: python3 -m pip install tox

- name: Install Microsoft ODBC
run: sudo ACCEPT_EULA=Y apt-get install msodbcsql18 -y

- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR

- name: Run Tests on PR
env:
DBT_VERSION: ${{ matrix.version }}
run: tox -e integration_sqlserver

integration-sqlserver-single-run:
strategy:
fail-fast: false # Don't fail one DWH if the others fail
matrix:
# When supporting a new version, update the list here
version: ["1_3_0", "1_4_0", "1_7_0", "1_8_0"]
runs-on: ubuntu-latest
environment:
name: Approve Integration Tests

steps:
- uses: actions/setup-python@v4
with:
python-version: "3.9.x"
architecture: "x64"
- name: Install SQL Server
uses: Particular/install-sql-server-action@v1.2.0
with:
connection-string-env-var: SQL_SERVER_CONNECTION_STRING
catalog: dbt_artifact_integrationtests
- name: Create DBT User
shell: pwsh
run: |
echo "Create dbt login with sysadmin"
sqlcmd -Q "CREATE LOGIN dbt WITH PASSWORD = '123', CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF" -d "dbt_artifact_integrationtests"
sqlcmd -Q "ALTER SERVER ROLE sysadmin ADD MEMBER dbt" -d "dbt_artifact_integrationtests"
- name: Install tox
run: python3 -m pip install tox
- name: Install Microsoft ODBC
run: sudo ACCEPT_EULA=Y apt-get install msodbcsql18 -y
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR
- name: Run Tests on PR
env:
DBT_VERSION: ${{ matrix.version }}
run: tox -e integration_sqlserver_${{ matrix.version }}
2 changes: 1 addition & 1 deletion .github/workflows/main_lint_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
architecture: "x64"

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

- name: Test database connection
run: dbt debug
Expand Down
48 changes: 45 additions & 3 deletions .github/workflows/main_test_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
integration:
strategy:
matrix:
warehouse: ["snowflake", "bigquery", "postgres", "sqlserver"]
version: ["1_3_0", "1_4_0", "1_5_0", "1_6_0", "1_7_0", "1_8_0"]
warehouse: ["snowflake", "bigquery", "postgres"]
version: ["1_3_0", "1_4_0", "1_5_0", "1_6_0", "1_7_0", "1_8_0", "1_9_0"]
runs-on: ubuntu-latest
permissions:
contents: "read"
Expand All @@ -60,7 +60,7 @@ jobs:

- uses: actions/setup-python@v4
with:
python-version: "3.8.x"
python-version: "3.9.x"
architecture: "x64"

- name: Install tox
Expand Down Expand Up @@ -102,3 +102,45 @@ jobs:

# - name: Run Databricks Tests
# run: tox -e integration_databricks

integration-sqlserver:
strategy:
fail-fast: false # Don't fail one DWH if the others fail
matrix:
# When supporting a new version, update the list here
version: ["1_3_0", "1_4_0", "1_7_0", "1_8_0"]
runs-on: ubuntu-latest
environment:
name: Approve Integration Tests

steps:
- uses: actions/setup-python@v4
with:
python-version: "3.9.x"
architecture: "x64"
- name: Install SQL Server
uses: Particular/install-sql-server-action@v1.2.0
with:
connection-string-env-var: SQL_SERVER_CONNECTION_STRING
catalog: dbt_artifact_integrationtests
- name: Create DBT User
shell: pwsh
run: |
echo "Create dbt login with sysadmin"
sqlcmd -Q "CREATE LOGIN dbt WITH PASSWORD = '123', CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF" -d "dbt_artifact_integrationtests"
sqlcmd -Q "ALTER SERVER ROLE sysadmin ADD MEMBER dbt" -d "dbt_artifact_integrationtests"
- name: Install tox
run: python3 -m pip install tox

- name: Install Microsoft ODBC
run: sudo ACCEPT_EULA=Y apt-get install msodbcsql18 -y

- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR

- name: Run Tests on PR
env:
DBT_VERSION: ${{ matrix.version }}
run: tox -e integration_sqlserver_${{ matrix.version }}
2 changes: 1 addition & 1 deletion .github/workflows/publish_docs_on_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: actions/checkout@v3

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

- name: Test database connection
run: dbt debug
Expand Down
2 changes: 2 additions & 0 deletions .mobsuccess.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
policy:
ignoreUpdateRepo: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ See the generated [dbt docs site](https://brooklyn-data.github.io/dbt_artifacts/
```
packages:
- package: brooklyn-data/dbt_artifacts
version: 2.6.4
version: 2.8.0
```

: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.
Expand Down
4 changes: 2 additions & 2 deletions dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "dbt_artifacts"
version: "2.6.4"
version: "2.8.0"
config-version: 2
require-dbt-version: [">=1.3.0", "<1.9.0"]
require-dbt-version: [">=1.3.0", "<1.10.0"]
profile: "dbt_artifacts"

clean-targets: # folders to be removed by `dbt clean`
Expand Down
3 changes: 2 additions & 1 deletion integration_test_project/profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@ dbt_artifacts:
schema: dbo
windows_login: False
trust_cert: True
user: sa
Encrypt: False
user: dbt
password: "123"
72 changes: 59 additions & 13 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,13 @@ commands = sqlfluff fix models --ignore parsing

# Generate docs
[testenv:generate_docs]
deps = dbt-snowflake~=1.8.0
deps = dbt-snowflake~=1.9.0
commands = dbt docs generate --profiles-dir integration_test_project

# Snowflake integration tests
[testenv:integration_snowflake]
changedir = integration_test_project
deps = dbt-snowflake~=1.8.0
deps = dbt-snowflake~=1.9.0
commands =
dbt clean
dbt deps
Expand Down Expand Up @@ -174,10 +174,18 @@ commands =
dbt deps
dbt build --target snowflake

[testenv:integration_snowflake_1_9_0]
changedir = integration_test_project
deps = dbt-snowflake~=1.9.0
commands =
dbt clean
dbt deps
dbt build --target snowflake

# Databricks integration tests
[testenv:integration_databricks]
changedir = integration_test_project
deps = dbt-databricks~=1.8.0
deps = dbt-databricks~=1.9.0
commands =
dbt clean
dbt deps
Expand Down Expand Up @@ -231,10 +239,18 @@ commands =
dbt deps
dbt build --target databricks

[testenv:integration_databricks_1_9_0]
changedir = integration_test_project
deps = dbt-databricks~=1.9.0
commands =
dbt clean
dbt deps
dbt build --target databricks

# Bigquery integration tests
[testenv:integration_bigquery]
changedir = integration_test_project
deps = dbt-bigquery~=1.8.0
deps = dbt-bigquery~=1.9.0
commands =
dbt clean
dbt deps
Expand Down Expand Up @@ -288,6 +304,14 @@ commands =
dbt deps
dbt build --target bigquery --vars '"my_var": "my value"'

[testenv:integration_bigquery_1_9_0]
changedir = integration_test_project
deps = dbt-bigquery~=1.9.0
commands =
dbt clean
dbt deps
dbt build --target bigquery --vars '"my_var": "my value"'

# Spark integration test (disabled)
[testenv:integration_spark]
changedir = integration_test_project
Expand All @@ -299,7 +323,9 @@ commands =

[testenv:integration_postgres]
changedir = integration_test_project
deps = dbt-postgres~=1.8.0
deps =
dbt-core~=1.9.0
dbt-postgres~=1.9.0
commands =
dbt clean
dbt deps
Expand Down Expand Up @@ -347,39 +373,59 @@ commands =

[testenv:integration_postgres_1_8_0]
changedir = integration_test_project
deps = dbt-postgres~=1.7.0
deps =
dbt-core~=1.8.0
dbt-postgres~=1.8.0
commands =
dbt clean
dbt deps
dbt build --target postgres

[testenv:integration_postgres_1_9_0]
changedir = integration_test_project
deps =
dbt-core~=1.9.0
dbt-postgres~=1.9.0
commands =
dbt clean
dbt deps
dbt build --target postgres

[testenv:integration_sqlserver]
changedir = integration_test_project
deps = dbt-sqlserver~=1.8.4
deps = dbt-sqlserver~=1.8.0
commands =
dbt clean
dbt deps
dbt build --target sqlserver

[testenv:integration_sqlserver_1_3_0]
changedir = integration_test_project
deps = dbt-sqlserver~=1.3.0
commands =
dbt clean
dbt deps
dbt build --target sqlserver

[testenv:integration_sqlserver_1_4_3]
[testenv:integration_sqlserver_1_4_0]
changedir = integration_test_project
deps = dbt-sqlserver~=1.4.3
deps = dbt-sqlserver~=1.4.0
commands =
dbt clean
dbt deps
dbt build --target sqlserver

[testenv:integration_sqlserver_1_7_4]
[testenv:integration_sqlserver_1_7_0]
changedir = integration_test_project
deps = dbt-sqlserver~=1.7.4
deps = dbt-sqlserver~=1.7.0
commands =
dbt clean
dbt deps
dbt build --target sqlserver

[testenv:integration_sqlserver_1_8_4]
[testenv:integration_sqlserver_1_8_0]
changedir = integration_test_project
deps = dbt-sqlserver~=1.8.4
deps = dbt-sqlserver~=1.8.0
commands =
dbt clean
dbt deps
Expand Down
Loading