From ea1c4b618c5684b8d8adb55dee830cabfc5ec175 Mon Sep 17 00:00:00 2001 From: leahwicz <60146280+leahwicz@users.noreply.github.com> Date: Fri, 3 Dec 2021 13:54:28 -0500 Subject: [PATCH 01/26] Merge `main` into `1.0.latest` (#46) * Slack message for failed nightly runs (#41) * Add Redshift parameter to create tables with backup option specified (#42) * Update impl and adapters to support backup parameter * Add test files * Add test files * Add PR link to Changelog * Add EOF newlines * Debug and split test into two separate cases * Add contributor info Co-authored-by: Jeremy Cohen * Bumping version to 1.0.0rc2 (#45) * Bumping version to 1.0.0rc2 * Update changelog Co-authored-by: Github Build Bot Co-authored-by: Jeremy Cohen Co-authored-by: Dan Bryan Co-authored-by: Jeremy Cohen Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Github Build Bot --- .bumpversion.cfg | 2 +- .github/workflows/integration.yml | 16 ++++ CHANGELOG.md | 8 ++ dbt/adapters/redshift/__version__.py | 2 +- dbt/adapters/redshift/impl.py | 1 + dbt/include/redshift/macros/adapters.sql | 2 + .../models/model_backup_false.sql | 7 ++ .../models/model_backup_true.sql | 7 ++ .../models/model_backup_true_view.sql | 7 ++ .../models/model_backup_undefined.sql | 7 ++ .../test_backup_table_option.py | 90 +++++++++++++++++++ 11 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 tests/integration/backup_table_tests/models/model_backup_false.sql create mode 100644 tests/integration/backup_table_tests/models/model_backup_true.sql create mode 100644 tests/integration/backup_table_tests/models/model_backup_true_view.sql create mode 100644 tests/integration/backup_table_tests/models/model_backup_undefined.sql create mode 100644 tests/integration/backup_table_tests/test_backup_table_option.py diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 55786d553..b03c74fcd 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.0.0rc1 +current_version = 1.0.0rc2 parse = (?P\d+) \.(?P\d+) \.(?P\d+) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index d864ef251..32df2d3ee 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -216,3 +216,19 @@ jobs: "You do not have permissions to run integration tests, @dbt-labs/core "\ "needs to label this PR with `ok to test` in order to run integration tests!" check_for_duplicate_msg: true + + slack-results: + runs-on: ubuntu-latest + needs: test + if: always() + + steps: + - name: Posting scheduled run failures + uses: ravsamhq/notify-slack-action@v1 + if: ${{ github.event_name == 'schedule' }} + with: + notification_title: 'Redshift nightly integration test failed' + status: ${{ job.status }} + notify_when: 'failure' + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DEV_CORE_ALERTS }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 39547c3e1..814bcc1c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ ## dbt-redshift 1.0.0 (Release TBD) +## dbt-redshift 1.0.0rc2 (November 24, 2021) + +### Under the hood +- Add optional Redshift parameter to create tables with BACKUP NO set, to exclude them from snapshots. ([#18](https://github.com/dbt-labs/dbt-redshift/issues/18), [#42](https://github.com/dbt-labs/dbt-redshift/pull/42)) + +### Contributors +- [@dlb8685](https://github.com/dlb8685) ([#42](https://github.com/dbt-labs/dbt-redshift/pull/42)) + ## dbt-redshift 1.0.0rc1 (November 10, 2021) ### Under the hood diff --git a/dbt/adapters/redshift/__version__.py b/dbt/adapters/redshift/__version__.py index 2c69af52f..a3f4934fd 100644 --- a/dbt/adapters/redshift/__version__.py +++ b/dbt/adapters/redshift/__version__.py @@ -1 +1 @@ -version = '1.0.0rc1' +version = '1.0.0rc2' diff --git a/dbt/adapters/redshift/impl.py b/dbt/adapters/redshift/impl.py index 46d36d8b6..0ee975973 100644 --- a/dbt/adapters/redshift/impl.py +++ b/dbt/adapters/redshift/impl.py @@ -19,6 +19,7 @@ class RedshiftConfig(AdapterConfig): dist: Optional[str] = None sort: Optional[str] = None bind: Optional[bool] = None + backup: Optional[bool] = True class RedshiftAdapter(PostgresAdapter, SQLAdapter): diff --git a/dbt/include/redshift/macros/adapters.sql b/dbt/include/redshift/macros/adapters.sql index 95f92811c..e81e823df 100644 --- a/dbt/include/redshift/macros/adapters.sql +++ b/dbt/include/redshift/macros/adapters.sql @@ -39,6 +39,7 @@ 'sort', validator=validation.any[list, basestring]) -%} {%- set sql_header = config.get('sql_header', none) -%} + {%- set backup = config.get('backup') -%} {{ sql_header if sql_header is not none }} @@ -46,6 +47,7 @@ {{ relation.include(database=(not temporary), schema=(not temporary)) }} {{ dist(_dist) }} {{ sort(_sort_type, _sort) }} + {% if backup == false -%}backup no{%- endif %} as ( {{ sql }} ); diff --git a/tests/integration/backup_table_tests/models/model_backup_false.sql b/tests/integration/backup_table_tests/models/model_backup_false.sql new file mode 100644 index 000000000..67900ac06 --- /dev/null +++ b/tests/integration/backup_table_tests/models/model_backup_false.sql @@ -0,0 +1,7 @@ +{{ + config( + materialized='table', backup=False + ) +}} + +select 1 diff --git a/tests/integration/backup_table_tests/models/model_backup_true.sql b/tests/integration/backup_table_tests/models/model_backup_true.sql new file mode 100644 index 000000000..882522da9 --- /dev/null +++ b/tests/integration/backup_table_tests/models/model_backup_true.sql @@ -0,0 +1,7 @@ +{{ + config( + materialized='table', backup=True + ) +}} + +select 2 diff --git a/tests/integration/backup_table_tests/models/model_backup_true_view.sql b/tests/integration/backup_table_tests/models/model_backup_true_view.sql new file mode 100644 index 000000000..841070a0a --- /dev/null +++ b/tests/integration/backup_table_tests/models/model_backup_true_view.sql @@ -0,0 +1,7 @@ +{{ + config( + materialized='view', backup=True + ) +}} + +select 3 diff --git a/tests/integration/backup_table_tests/models/model_backup_undefined.sql b/tests/integration/backup_table_tests/models/model_backup_undefined.sql new file mode 100644 index 000000000..54468d510 --- /dev/null +++ b/tests/integration/backup_table_tests/models/model_backup_undefined.sql @@ -0,0 +1,7 @@ +{{ + config( + materialized='table' + ) +}} + +select 4 diff --git a/tests/integration/backup_table_tests/test_backup_table_option.py b/tests/integration/backup_table_tests/test_backup_table_option.py new file mode 100644 index 000000000..b31da3adf --- /dev/null +++ b/tests/integration/backup_table_tests/test_backup_table_option.py @@ -0,0 +1,90 @@ +import os + +from tests.integration.base import DBTIntegrationTest, use_profile + + +class TestBackupTableOption(DBTIntegrationTest): + @property + def schema(self): + return 'backup_table_tests' + + @staticmethod + def dir(path): + return os.path.normpath(path) + + @property + def models(self): + return self.dir("models") + + @property + def project_config(self): + return { + 'config-version': 2 + } + + def check_backup_param_template(self, test_table_name, backup_is_expected): + # Use raw DDL statement to confirm backup is set correctly on new table + with open('target/run/test/models/{}.sql'.format(test_table_name), 'r') as ddl_file: + ddl_statement = ddl_file.readlines() + self.assertEqual('backup no' not in ' '.join(ddl_statement).lower(), backup_is_expected) + + @use_profile('redshift') + def test__redshift_backup_table_option(self): + self.assertEqual(len(self.run_dbt()), 4) + + # model_backup_undefined should not contain a BACKUP NO parameter in the table DDL + self.check_backup_param_template('model_backup_undefined', True) + + # model_backup_true should not contain a BACKUP NO parameter in the table DDL + self.check_backup_param_template('model_backup_true', True) + + # model_backup_false should contain a BACKUP NO parameter in the table DDL + self.check_backup_param_template('model_backup_false', False) + + # Any view should not contain a BACKUP NO parameter, regardless of the specified config (create will fail) + self.check_backup_param_template('model_backup_true_view', True) + + +class TestBackupTableOptionProjectFalse(DBTIntegrationTest): + @property + def schema(self): + return 'backup_table_tests' + + @staticmethod + def dir(path): + return os.path.normpath(path) + + @property + def models(self): + return self.dir("models") + + @property + def project_config(self): + # Update project config to set backup to False. + # This should make the 'model_backup_undefined' switch to BACKUP NO + return { + 'config-version': 2, + 'models': {'backup': False} + } + + def check_backup_param_template(self, test_table_name, backup_is_expected): + # Use raw DDL statement to confirm backup is set correctly on new table + with open('target/run/test/models/{}.sql'.format(test_table_name), 'r') as ddl_file: + ddl_statement = ddl_file.readlines() + self.assertEqual('backup no' not in ' '.join(ddl_statement).lower(), backup_is_expected) + + @use_profile('redshift') + def test__redshift_backup_table_option_project_config_false(self): + self.assertEqual(len(self.run_dbt()), 4) + + # model_backup_undefined should contain a BACKUP NO parameter in the table DDL + self.check_backup_param_template('model_backup_undefined', False) + + # model_backup_true should not contain a BACKUP NO parameter in the table DDL + self.check_backup_param_template('model_backup_true', True) + + # model_backup_false should contain a BACKUP NO parameter in the table DDL + self.check_backup_param_template('model_backup_false', False) + + # Any view should not contain a BACKUP NO parameter, regardless of the specified config (create will fail) + self.check_backup_param_template('model_backup_true_view', True) From ffce642b222613bc8bb4cdb295598836bdc6baeb Mon Sep 17 00:00:00 2001 From: leahwicz <60146280+leahwicz@users.noreply.github.com> Date: Fri, 3 Dec 2021 14:33:13 -0500 Subject: [PATCH 02/26] [Backport] Bumping version to 1.0.0 (#47) (#48) * Bumping version to 1.0.0 (#47) Co-authored-by: Github Build Bot * Update CHANGELOG.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Github Build Bot --- .bumpversion.cfg | 2 +- CHANGELOG.md | 2 +- dbt/adapters/redshift/__version__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index b03c74fcd..ba3726eb3 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.0.0rc2 +current_version = 1.0.0 parse = (?P\d+) \.(?P\d+) \.(?P\d+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 814bcc1c4..79c89375a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## dbt-redshift 1.0.0 (Release TBD) +## dbt-redshift 1.0.0 (December 3, 2021) ## dbt-redshift 1.0.0rc2 (November 24, 2021) diff --git a/dbt/adapters/redshift/__version__.py b/dbt/adapters/redshift/__version__.py index a3f4934fd..de43469d2 100644 --- a/dbt/adapters/redshift/__version__.py +++ b/dbt/adapters/redshift/__version__.py @@ -1 +1 @@ -version = '1.0.0rc2' +version = '1.0.0' From 58efd83908340c0f1eb7893c2ebc4f4f64662167 Mon Sep 17 00:00:00 2001 From: leahwicz <60146280+leahwicz@users.noreply.github.com> Date: Fri, 3 Dec 2021 15:42:30 -0500 Subject: [PATCH 03/26] Fix package version (#49) --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 20205f3a0..c9a76bac0 100644 --- a/setup.py +++ b/setup.py @@ -55,9 +55,9 @@ def _get_dbt_core_version(): pre = (parts["prekind"]+"1" if parts["prekind"] else "") return f"{minor}{pre}" - +#TODO remove old logic and add to versionBump script package_name = "dbt-redshift" -package_version = _get_plugin_version() +package_version = "1.0.0" dbt_core_version = _get_dbt_core_version() description = """The Redshift adapter plugin for dbt""" From 5571085b6bc821c13b337aad83a9807ff851c817 Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Fri, 11 Mar 2022 14:22:46 -0600 Subject: [PATCH 04/26] using string interpoloation to gather correct pointer for dbt-core tests against release branches --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8026befda..1e8d4e245 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -101,13 +101,13 @@ jobs: pip --version tox --version - - name: Install dbt-core latest + - name: Install dbt-core from branch ${{ github.event.pull_request.base.ref }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-core&subdirectory=core" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ github.event.pull_request.base.ref }}#egg=dbt-core&subdirectory=core" - - name: Install dbt-postgres latest + - name: Install dbt-postgres from ${{ github.event.pull_request.base.ref }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-postgres&subdirectory=plugins/postgres" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ github.event.pull_request.base.ref }}#egg=dbt-postgres&subdirectory=plugins/postgres" - name: Run tox run: tox From c318e41bc03405fabe18b2ed70740130af9f0f81 Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Fri, 11 Mar 2022 15:01:29 -0600 Subject: [PATCH 05/26] created new job for gha to grab correct version of dbt-core to test branch against --- .github/workflows/main.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1e8d4e245..a7226221a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -93,7 +93,14 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - + - name: Get dbt-core version + id: dbt-core-version + run: | + echo "::set-output name=dbt-version::${{ + ( contains( github.event.pull_request.base.ref, 'latest' ) || github.event.pull_request.base.ref == main) + && github.event.pull_request.base.ref + || main + }}" - name: Install python dependencies run: | pip install --user --upgrade pip @@ -101,13 +108,13 @@ jobs: pip --version tox --version - - name: Install dbt-core from branch ${{ github.event.pull_request.base.ref }} + - name: Install dbt-core from branch ${{ steps.dbt-core-version.outputs.dbt-version }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ github.event.pull_request.base.ref }}#egg=dbt-core&subdirectory=core" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-version }}#egg=dbt-core&subdirectory=core" - - name: Install dbt-postgres from ${{ github.event.pull_request.base.ref }} + - name: Install dbt-postgres from ${{ steps.dbt-core-version.outputs.dbt-version }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ github.event.pull_request.base.ref }}#egg=dbt-postgres&subdirectory=plugins/postgres" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-version }}#egg=dbt-postgres&subdirectory=plugins/postgres" - name: Run tox run: tox From d1a04d045d35f842fa279840b504169d2ca7fa69 Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Fri, 11 Mar 2022 15:48:23 -0600 Subject: [PATCH 06/26] minor update --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a7226221a..f4ee4f9c1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -99,7 +99,7 @@ jobs: echo "::set-output name=dbt-version::${{ ( contains( github.event.pull_request.base.ref, 'latest' ) || github.event.pull_request.base.ref == main) && github.event.pull_request.base.ref - || main + || 'main' }}" - name: Install python dependencies run: | From f21bc6ff167b3595db0bb7a9aa7067b1ba0239cd Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Fri, 11 Mar 2022 16:49:01 -0600 Subject: [PATCH 07/26] adding Get dbt-core-version step to integration.yaml --- .github/workflows/integration.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 32df2d3ee..6bc83477b 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -151,7 +151,14 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - + - name: Get dbt-core version + id: dbt-core-version + run: | + echo "::set-output name=dbt-version::${{ + ( contains( github.event.pull_request.base.ref, 'latest' ) || github.event.pull_request.base.ref == main) + && github.event.pull_request.base.ref + || 'main' + }}" - name: Install python dependencies run: | pip install --user --upgrade pip @@ -159,13 +166,13 @@ jobs: pip --version tox --version - - name: Install dbt-core latest + - name: Install dbt-core from branch ${{ steps.dbt-core-version.outputs.dbt-version }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-core&subdirectory=core" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-version }}#egg=dbt-core&subdirectory=core" - - name: Install dbt-postgres latest + - name: Install dbt-postgres from ${{ steps.dbt-core-version.outputs.dbt-version }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-postgres&subdirectory=plugins/postgres" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-version }}#egg=dbt-postgres&subdirectory=plugins/postgres" - name: Run tox (redshift) if: matrix.adapter == 'redshift' From bac8f968e7140c9b0b1967d244203893c13392df Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Mon, 14 Mar 2022 14:16:44 -0500 Subject: [PATCH 08/26] modifying version parameters --- .github/workflows/integration.yml | 2 +- .github/workflows/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 3aac2c09b..1983dba53 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -155,7 +155,7 @@ jobs: id: dbt-core-version run: | echo "::set-output name=dbt-version::${{ - ( contains( github.event.pull_request.base.ref, 'latest' ) || github.event.pull_request.base.ref == main) + contains( github.event.pull_request.base.ref, 'latest' ) && github.event.pull_request.base.ref || 'main' }}" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f4ee4f9c1..987216289 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -97,7 +97,7 @@ jobs: id: dbt-core-version run: | echo "::set-output name=dbt-version::${{ - ( contains( github.event.pull_request.base.ref, 'latest' ) || github.event.pull_request.base.ref == main) + contains( github.event.pull_request.base.ref, 'latest') && github.event.pull_request.base.ref || 'main' }}" From 7886109abfe51baa86d5c0f6d14e8aa2831f94fd Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Mon, 14 Mar 2022 14:27:32 -0500 Subject: [PATCH 09/26] change for integration testing --- .github/workflows/integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 1983dba53..774aecf80 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -30,7 +30,7 @@ on: - "releases/*" # all PRs, important to note that `pull_request_target` workflows # will run in the context of the target branch of a PR - pull_request_target: + pull_request: # manual trigger workflow_dispatch: # run this once per night to ensure no regressions from latest dbt-core changes From d54ef1da33d0bef12ff51273553fd760a66462ad Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Mon, 14 Mar 2022 14:39:55 -0500 Subject: [PATCH 10/26] updating file --- dbt/include/redshift/macros/adapters.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/dbt/include/redshift/macros/adapters.sql b/dbt/include/redshift/macros/adapters.sql index 26aaaefbd..e82931857 100644 --- a/dbt/include/redshift/macros/adapters.sql +++ b/dbt/include/redshift/macros/adapters.sql @@ -48,7 +48,6 @@ {% if backup == false -%}backup no{%- endif %} {{ dist(_dist) }} {{ sort(_sort_type, _sort) }} - {% if backup == false -%}backup no{%- endif %} as ( {{ sql }} ); From b6afaa5ab1e06c9d5d60be664463caf725bfedec Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Mon, 14 Mar 2022 14:48:21 -0500 Subject: [PATCH 11/26] readding pull_request_target now that tests pass --- .github/workflows/integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 774aecf80..1983dba53 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -30,7 +30,7 @@ on: - "releases/*" # all PRs, important to note that `pull_request_target` workflows # will run in the context of the target branch of a PR - pull_request: + pull_request_target: # manual trigger workflow_dispatch: # run this once per night to ensure no regressions from latest dbt-core changes From 95af266512db7ddbbc1004880d9448d4cd82804a Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Fri, 18 Mar 2022 10:40:38 -0500 Subject: [PATCH 12/26] make nit: suggested changes --- .github/workflows/integration.yml | 2 -- setup.py | 2 +- .../integration/backup_table_tests/test_backup_table_option.py | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 1983dba53..8efde9970 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -224,13 +224,11 @@ jobs: "needs to label this PR with `ok to test` in order to run integration tests!" check_for_duplicate_msg: true - post-failure: runs-on: ubuntu-latest needs: test if: ${{ failure() }} - steps: - name: Posting scheduled run failures uses: ravsamhq/notify-slack-action@v1 diff --git a/setup.py b/setup.py index 74f654b32..6a858f740 100644 --- a/setup.py +++ b/setup.py @@ -50,7 +50,7 @@ def _get_dbt_core_version(): pre = (parts["prekind"]+"1" if parts["prekind"] else "") return f"{minor}{pre}" -#TODO remove old logic and add to versionBump script + package_name = "dbt-redshift" package_version = "1.0.0" dbt_core_version = _get_dbt_core_version() diff --git a/tests/integration/backup_table_tests/test_backup_table_option.py b/tests/integration/backup_table_tests/test_backup_table_option.py index 8871cb728..efd0dff9c 100644 --- a/tests/integration/backup_table_tests/test_backup_table_option.py +++ b/tests/integration/backup_table_tests/test_backup_table_option.py @@ -71,7 +71,6 @@ def check_backup_param_template(self, test_table_name, backup_is_expected): # Use raw DDL statement to confirm backup is set correctly on new table with open('target/run/test/models/{}.sql'.format(test_table_name), 'r') as ddl_file: ddl_statement = ddl_file.readlines() - lowercase_statement = ' '.join(ddl_statement).lower() self.assertEqual('backup no' not in lowercase_statement, backup_is_expected) From fc3163a23c225924d7a896b72802df830697d1e2 Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Fri, 18 Mar 2022 13:41:00 -0500 Subject: [PATCH 13/26] testing conditional logic in integration.yml --- .github/workflows/integration.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 8efde9970..f06629943 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -153,12 +153,10 @@ jobs: python-version: ${{ matrix.python-version }} - name: Get dbt-core version id: dbt-core-version - run: | - echo "::set-output name=dbt-version::${{ - contains( github.event.pull_request.base.ref, 'latest' ) - && github.event.pull_request.base.ref - || 'main' - }}" + if: github.event_name == 'pull_request_target' + run: echo "::set-output name=dbt-version::${{ github.base_ref }}" + if: github.event_name != 'pull_request_target' + run: echo "::set-output name=dbt-version::${{ github.ref }}" - name: Install python dependencies run: | pip install --user --upgrade pip From e06d067d5fc5c9e79eda511b0e8c52a81e006428 Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Fri, 18 Mar 2022 14:09:01 -0500 Subject: [PATCH 14/26] updating test names --- .github/workflows/integration.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index f06629943..f9e534069 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -151,10 +151,12 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Get dbt-core version + - name: Get dbt-core version (pull requests) id: dbt-core-version if: github.event_name == 'pull_request_target' run: echo "::set-output name=dbt-version::${{ github.base_ref }}" + - name: Get dbt-core version (non pull requests) + id: dbt-core-version if: github.event_name != 'pull_request_target' run: echo "::set-output name=dbt-version::${{ github.ref }}" - name: Install python dependencies From eb124491cb3aea35155ca6616722cbe3e039f67f Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Fri, 18 Mar 2022 14:13:34 -0500 Subject: [PATCH 15/26] creating main.yml versions of new condtional steps for dbt-version gather --- .github/workflows/main.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 987216289..39ed3ef6c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -93,14 +93,14 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Get dbt-core version + - name: Get dbt-core version (pull requests) id: dbt-core-version - run: | - echo "::set-output name=dbt-version::${{ - contains( github.event.pull_request.base.ref, 'latest') - && github.event.pull_request.base.ref - || 'main' - }}" + if: github.event_name == 'pull_request' + run: echo "::set-output name=dbt-version::${{ github.base_ref }}" + - name: Get dbt-core version (non pull requests) + id: dbt-core-version + if: github.event_name != 'pull_request' + run: echo "::set-output name=dbt-version::${{ github.ref }}" - name: Install python dependencies run: | pip install --user --upgrade pip From 64847f0efa801ba7eca49f87624121416626dd17 Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Fri, 18 Mar 2022 14:32:35 -0500 Subject: [PATCH 16/26] trying different version of test v.2 --- .github/workflows/main.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 39ed3ef6c..fad6f52ca 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -93,12 +93,10 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Get dbt-core version (pull requests) + - name: Get dbt-core version id: dbt-core-version if: github.event_name == 'pull_request' run: echo "::set-output name=dbt-version::${{ github.base_ref }}" - - name: Get dbt-core version (non pull requests) - id: dbt-core-version if: github.event_name != 'pull_request' run: echo "::set-output name=dbt-version::${{ github.ref }}" - name: Install python dependencies From dade718613620bdf8e6ac7610d14adf5e0b2a77a Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Fri, 18 Mar 2022 14:39:52 -0500 Subject: [PATCH 17/26] v.3 of conditional mix of original version of tests and leah logic --- .github/workflows/integration.yml | 9 ++------- .github/workflows/main.yml | 5 +---- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index f9e534069..204d9dcf8 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -151,14 +151,9 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Get dbt-core version (pull requests) + - name: Get dbt-core version id: dbt-core-version - if: github.event_name == 'pull_request_target' - run: echo "::set-output name=dbt-version::${{ github.base_ref }}" - - name: Get dbt-core version (non pull requests) - id: dbt-core-version - if: github.event_name != 'pull_request_target' - run: echo "::set-output name=dbt-version::${{ github.ref }}" + run: echo "::set-output name=dbt-version::${{ github.event_name == 'pull_request_target' && github.base_ref || github.ref }}" - name: Install python dependencies run: | pip install --user --upgrade pip diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fad6f52ca..dd652aa60 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -95,10 +95,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Get dbt-core version id: dbt-core-version - if: github.event_name == 'pull_request' - run: echo "::set-output name=dbt-version::${{ github.base_ref }}" - if: github.event_name != 'pull_request' - run: echo "::set-output name=dbt-version::${{ github.ref }}" + run: echo "::set-output name=dbt-version::${{ github.event_name == 'pull_request' && github.base_ref || github.ref }}" - name: Install python dependencies run: | pip install --user --upgrade pip From b5c38eaf8539294a75776f88cc29116ae246b7ef Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Fri, 18 Mar 2022 14:49:20 -0500 Subject: [PATCH 18/26] adding comment and changelog entry --- .github/workflows/integration.yml | 1 + .github/workflows/main.yml | 1 + CHANGELOG.md | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 204d9dcf8..cdaa6afb0 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -152,6 +152,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Get dbt-core version + # if this is a pull request uses ref of base branch otherwise uses ref of current commit id: dbt-core-version run: echo "::set-output name=dbt-version::${{ github.event_name == 'pull_request_target' && github.base_ref || github.ref }}" - name: Install python dependencies diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dd652aa60..2f4181da1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -94,6 +94,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Get dbt-core version + # if this is a pull request uses ref of base branch otherwise uses ref of current commit id: dbt-core-version run: echo "::set-output name=dbt-version::${{ github.event_name == 'pull_request' && github.base_ref || github.ref }}" - name: Install python dependencies diff --git a/CHANGELOG.md b/CHANGELOG.md index 88b0c53e7..783b71f0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ - Fix table creation statement ordering when including both the BACKUP parameter as well as the dist/sort keys ([#23](https://github.com/dbt-labs/dbt-redshift/issues/60)) - Add unique\_id field to docs generation test catalogs; a follow-on PR to core PR ([#4168](https://github.com/dbt-labs/dbt-core/pull/4618)) and core PR ([#4701](https://github.com/dbt-labs/dbt-core/pull/4701)) +### Under the hood +- install compatiable branch of dbt-core in unit/integration tests based on merge target ([#80](https://github.com/dbt-labs/dbt-redshift/pull/80)) + ## dbt-redshift 1.0.0 (December 3, 2021) ## dbt-redshift 1.0.0rc2 (November 24, 2021) @@ -12,6 +15,7 @@ ### Under the hood - Add optional Redshift parameter to create tables with BACKUP NO set, to exclude them from snapshots. ([#18](https://github.com/dbt-labs/dbt-redshift/issues/18), [#42](https://github.com/dbt-labs/dbt-redshift/pull/42)) + ### Contributors - [@dlb8685](https://github.com/dlb8685) ([#42](https://github.com/dbt-labs/dbt-redshift/pull/42)) From bfe69d7eac3b34c0e0f5730e78e2f180a80c5351 Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Sat, 19 Mar 2022 01:02:33 -0500 Subject: [PATCH 19/26] changes made after review by @VersusFacit and @Kwigley --- .github/workflows/integration.yml | 4 ++-- .github/workflows/main.yml | 4 ++-- CHANGELOG.md | 2 +- .../backup_table_tests/test_backup_table_option.py | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index cdaa6afb0..e971dc53a 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -162,9 +162,9 @@ jobs: pip --version tox --version - - name: Install dbt-core from branch ${{ steps.dbt-core-version.outputs.dbt-version }} + - name: Install dbt-core from branch ${{ steps.dbt-core-version.outputs.dbt-version.dbt-core-ref }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-version }}#egg=dbt-core&subdirectory=core" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-version.dbt-core-ref }}#egg=dbt-core&subdirectory=core" - name: Install dbt-postgres from ${{ steps.dbt-core-version.outputs.dbt-version }} run: | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2f4181da1..55a0e4eb0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -104,9 +104,9 @@ jobs: pip --version tox --version - - name: Install dbt-core from branch ${{ steps.dbt-core-version.outputs.dbt-version }} + - name: Install dbt-core from branch ${{ steps.dbt-core-version.outputs.dbt-version.dbt-core-ref }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-version }}#egg=dbt-core&subdirectory=core" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-version.dbt-core-ref }}#egg=dbt-core&subdirectory=core" - name: Install dbt-postgres from ${{ steps.dbt-core-version.outputs.dbt-version }} run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 783b71f0f..2efaba6df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ - Add unique\_id field to docs generation test catalogs; a follow-on PR to core PR ([#4168](https://github.com/dbt-labs/dbt-core/pull/4618)) and core PR ([#4701](https://github.com/dbt-labs/dbt-core/pull/4701)) ### Under the hood -- install compatiable branch of dbt-core in unit/integration tests based on merge target ([#80](https://github.com/dbt-labs/dbt-redshift/pull/80)) +- install compatible branch of dbt-core in unit/integration tests based on merge target ([#80](https://github.com/dbt-labs/dbt-redshift/pull/80)) ## dbt-redshift 1.0.0 (December 3, 2021) diff --git a/tests/integration/backup_table_tests/test_backup_table_option.py b/tests/integration/backup_table_tests/test_backup_table_option.py index efd0dff9c..6f017d746 100644 --- a/tests/integration/backup_table_tests/test_backup_table_option.py +++ b/tests/integration/backup_table_tests/test_backup_table_option.py @@ -132,4 +132,3 @@ def test__redshift_backup_table_option_project_config_false(self): # model_backup_param_before_sortkey should contain a BACKUP NO parameter which precedes a SORTKEY in the table ddl self.check_backup_param_template('model_backup_param_before_sortkey', False) - From d19a37428ce0f66754eb79716a3fefaf2f4f60ad Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Sat, 19 Mar 2022 01:12:40 -0500 Subject: [PATCH 20/26] name change --- .github/workflows/integration.yml | 2 +- .github/workflows/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index e971dc53a..ab0b07e61 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -164,7 +164,7 @@ jobs: - name: Install dbt-core from branch ${{ steps.dbt-core-version.outputs.dbt-version.dbt-core-ref }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-version.dbt-core-ref }}#egg=dbt-core&subdirectory=core" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-version }}#egg=dbt-core&subdirectory=core" - name: Install dbt-postgres from ${{ steps.dbt-core-version.outputs.dbt-version }} run: | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 55a0e4eb0..cacaab1d4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -106,7 +106,7 @@ jobs: - name: Install dbt-core from branch ${{ steps.dbt-core-version.outputs.dbt-version.dbt-core-ref }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-version.dbt-core-ref }}#egg=dbt-core&subdirectory=core" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-version }}#egg=dbt-core&subdirectory=core" - name: Install dbt-postgres from ${{ steps.dbt-core-version.outputs.dbt-version }} run: | From 31d0b712a561a2ac65df625f767626149f0f62de Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Mon, 21 Mar 2022 11:39:24 -0500 Subject: [PATCH 21/26] minor updates --- CHANGELOG.md | 1 - tests/integration/backup_table_tests/test_backup_table_option.py | 1 - 2 files changed, 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2efaba6df..4958107e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,6 @@ ### Under the hood - Add optional Redshift parameter to create tables with BACKUP NO set, to exclude them from snapshots. ([#18](https://github.com/dbt-labs/dbt-redshift/issues/18), [#42](https://github.com/dbt-labs/dbt-redshift/pull/42)) - ### Contributors - [@dlb8685](https://github.com/dlb8685) ([#42](https://github.com/dbt-labs/dbt-redshift/pull/42)) diff --git a/tests/integration/backup_table_tests/test_backup_table_option.py b/tests/integration/backup_table_tests/test_backup_table_option.py index 6f017d746..bb6842c02 100644 --- a/tests/integration/backup_table_tests/test_backup_table_option.py +++ b/tests/integration/backup_table_tests/test_backup_table_option.py @@ -90,7 +90,6 @@ def test__redshift_backup_table_option_project_config_false(self): # Any view should not contain a BACKUP NO parameter, regardless of the specified config (create will fail) self.check_backup_param_template('model_backup_true_view', True) - class TestBackupTableOptionOrder(DBTIntegrationTest): @property def schema(self): From bd7f2ac22a8d7b180cf5bebcf9a822d893db4b62 Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Mon, 21 Mar 2022 12:38:48 -0500 Subject: [PATCH 22/26] updating name of version ref --- .github/workflows/integration.yml | 4 ++-- .github/workflows/main.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index ab0b07e61..091cdccf8 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -162,9 +162,9 @@ jobs: pip --version tox --version - - name: Install dbt-core from branch ${{ steps.dbt-core-version.outputs.dbt-version.dbt-core-ref }} + - name: Install dbt-core from branch ${{ steps.dbt-core-version.outputs.dbt-core-ref }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-version }}#egg=dbt-core&subdirectory=core" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-core-ref }}#egg=dbt-core&subdirectory=core" - name: Install dbt-postgres from ${{ steps.dbt-core-version.outputs.dbt-version }} run: | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cacaab1d4..ccb356067 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -104,9 +104,9 @@ jobs: pip --version tox --version - - name: Install dbt-core from branch ${{ steps.dbt-core-version.outputs.dbt-version.dbt-core-ref }} + - name: Install dbt-core from branch ${{ steps.dbt-core-version.outputs.dbt-core-ref }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-version }}#egg=dbt-core&subdirectory=core" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-core-ref }}#egg=dbt-core&subdirectory=core" - name: Install dbt-postgres from ${{ steps.dbt-core-version.outputs.dbt-version }} run: | From c902a60d6d5ecbbe292e6e0a7bdd9f346835dd58 Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Mon, 21 Mar 2022 12:47:56 -0500 Subject: [PATCH 23/26] name change of dbt-version step to dbt-core-ref to be more descriptive iof where version is coming from --- .github/workflows/integration.yml | 6 +++--- .github/workflows/main.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 091cdccf8..f9b0ef48a 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -154,7 +154,7 @@ jobs: - name: Get dbt-core version # if this is a pull request uses ref of base branch otherwise uses ref of current commit id: dbt-core-version - run: echo "::set-output name=dbt-version::${{ github.event_name == 'pull_request_target' && github.base_ref || github.ref }}" + run: echo "::set-output name=dbt-core-ref::${{ github.event_name == 'pull_request_target' && github.base_ref || github.ref }}" - name: Install python dependencies run: | pip install --user --upgrade pip @@ -166,9 +166,9 @@ jobs: run: | pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-core-ref }}#egg=dbt-core&subdirectory=core" - - name: Install dbt-postgres from ${{ steps.dbt-core-version.outputs.dbt-version }} + - name: Install dbt-postgres from ${{ steps.dbt-core-version.outputs.dbt-core-ref }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-version }}#egg=dbt-postgres&subdirectory=plugins/postgres" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-core-ref }}#egg=dbt-postgres&subdirectory=plugins/postgres" - name: Run tox (redshift) if: matrix.adapter == 'redshift' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ccb356067..442184738 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -96,7 +96,7 @@ jobs: - name: Get dbt-core version # if this is a pull request uses ref of base branch otherwise uses ref of current commit id: dbt-core-version - run: echo "::set-output name=dbt-version::${{ github.event_name == 'pull_request' && github.base_ref || github.ref }}" + run: echo "::set-output name=dbt-core-ref::${{ github.event_name == 'pull_request' && github.base_ref || github.ref }}" - name: Install python dependencies run: | pip install --user --upgrade pip @@ -108,9 +108,9 @@ jobs: run: | pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-core-ref }}#egg=dbt-core&subdirectory=core" - - name: Install dbt-postgres from ${{ steps.dbt-core-version.outputs.dbt-version }} + - name: Install dbt-postgres from ${{ steps.dbt-core-version.outputs.dbt-core-ref }} run: | - pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-version }}#egg=dbt-postgres&subdirectory=plugins/postgres" + pip install "git+https://github.com/dbt-labs/dbt-core.git@${{ steps.dbt-core-version.outputs.dbt-core-ref }}#egg=dbt-postgres&subdirectory=plugins/postgres" - name: Run tox run: tox From ba7531a04a77fb129472df010580211be61c6e34 Mon Sep 17 00:00:00 2001 From: Matthew McKnight <91097623+McKnight-42@users.noreply.github.com> Date: Mon, 21 Mar 2022 16:18:46 -0500 Subject: [PATCH 24/26] Update test_backup_table_option.py From f1e373260eff65667f3dbfa06e1bec5f4e8d3df3 Mon Sep 17 00:00:00 2001 From: Matthew McKnight <91097623+McKnight-42@users.noreply.github.com> Date: Mon, 21 Mar 2022 16:31:27 -0500 Subject: [PATCH 25/26] Update test_backup_table_option.py From 698ac86a5686fc43de79433a96c9f7fab3248d35 Mon Sep 17 00:00:00 2001 From: Matthew McKnight Date: Mon, 21 Mar 2022 16:45:50 -0500 Subject: [PATCH 26/26] reseting file that shouldn't of been changed --- .../integration/backup_table_tests/test_backup_table_option.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/backup_table_tests/test_backup_table_option.py b/tests/integration/backup_table_tests/test_backup_table_option.py index bb6842c02..e32bca803 100644 --- a/tests/integration/backup_table_tests/test_backup_table_option.py +++ b/tests/integration/backup_table_tests/test_backup_table_option.py @@ -130,4 +130,4 @@ def test__redshift_backup_table_option_project_config_false(self): self.check_backup_param_template('model_backup_param_before_distkey', False) # model_backup_param_before_sortkey should contain a BACKUP NO parameter which precedes a SORTKEY in the table ddl - self.check_backup_param_template('model_backup_param_before_sortkey', False) + self.check_backup_param_template('model_backup_param_before_sortkey', False) \ No newline at end of file