From fb2f2a4000b36dc8ff243234fbf527a1f7bf17a3 Mon Sep 17 00:00:00 2001 From: Zane Clark Date: Thu, 14 Nov 2024 18:54:58 -0800 Subject: [PATCH] feat: restructure integration test --- .github/workflows/master-pytest.yml | 57 ++++++++++++++++--- .../1_setup/A__setup.sql} | 0 demo/basics_demo/{ => 2_test}/A__basic001.sql | 0 demo/basics_demo/{ => 2_test}/A__render.sql | 0 demo/basics_demo/{ => 2_test}/R__basic001.sql | 0 demo/basics_demo/{ => 2_test}/R__render.sql | 0 .../{ => 2_test}/V1.0.0__render.sql | 0 .../{ => 2_test}/V1.0.1__EOF_FIle.sql | 0 .../{ => 2_test}/V1.0.2__StoredProc.sql | 0 .../3_teardown/A__teardown.sql} | 0 demo/basics_demo/schemachange-config.yml | 6 -- .../1_setup/A__setup.sql} | 0 demo/citibike_demo/{ => 2_test}/A__checks.sql | 0 demo/citibike_demo/{ => 2_test}/A__render.sql | 0 demo/citibike_demo/{ => 2_test}/R__checks.sql | 0 demo/citibike_demo/{ => 2_test}/R__render.sql | 0 .../{ => 2_test}/V1.0.0__render.sql | 0 .../V1.1.0__initial_database_objects.sql | 0 .../V1.2.0__load_tables_from_s3.sql | 0 .../3_teardown/A__teardown.sql} | 0 demo/citibike_demo/schemachange-config.yml | 6 -- .../1_setup/A__setup.sql} | 0 .../{ => 2_test}/A__render.sql | 0 .../{ => 2_test}/R__render.sql | 0 .../{ => 2_test}/V1.0.0__render.sql | 0 .../V1.1.0__initial_database_objects.sql | 0 .../V1.2.0__load_tables_from_s3.sql | 0 .../3_teardown/A__teardown.sql} | 0 .../schemachange-config.yml | 6 -- ...nfig.yml => schemachange-config-setup.yml} | 5 -- ...g.yml => schemachange-config-teardown.yml} | 5 -- .../citibike_demo/schemachange-config.yml | 16 ------ .../schemachange-config.yml | 16 ------ .../basics_demo/schemachange-config.yml | 16 ------ .../schemachange-config.yml | 16 ------ 35 files changed, 50 insertions(+), 99 deletions(-) rename demo/{setup/basics_demo/A__setup_basics_demo.sql => basics_demo/1_setup/A__setup.sql} (100%) rename demo/basics_demo/{ => 2_test}/A__basic001.sql (100%) rename demo/basics_demo/{ => 2_test}/A__render.sql (100%) rename demo/basics_demo/{ => 2_test}/R__basic001.sql (100%) rename demo/basics_demo/{ => 2_test}/R__render.sql (100%) rename demo/basics_demo/{ => 2_test}/V1.0.0__render.sql (100%) rename demo/basics_demo/{ => 2_test}/V1.0.1__EOF_FIle.sql (100%) rename demo/basics_demo/{ => 2_test}/V1.0.2__StoredProc.sql (100%) rename demo/{teardown/basics_demo/A__teardown_basics_demo.sql => basics_demo/3_teardown/A__teardown.sql} (100%) rename demo/{setup/citibike_demo/A__setup_citibike_demo.sql => citibike_demo/1_setup/A__setup.sql} (100%) rename demo/citibike_demo/{ => 2_test}/A__checks.sql (100%) rename demo/citibike_demo/{ => 2_test}/A__render.sql (100%) rename demo/citibike_demo/{ => 2_test}/R__checks.sql (100%) rename demo/citibike_demo/{ => 2_test}/R__render.sql (100%) rename demo/citibike_demo/{ => 2_test}/V1.0.0__render.sql (100%) rename demo/citibike_demo/{ => 2_test}/V1.1.0__initial_database_objects.sql (100%) rename demo/citibike_demo/{ => 2_test}/V1.2.0__load_tables_from_s3.sql (100%) rename demo/{teardown/citibike_demo/A__teardown_citibike_demo.sql => citibike_demo/3_teardown/A__teardown.sql} (100%) rename demo/{setup/citibike_demo_jinja/A__setup_citibike_demo_jinja.sql => citibike_demo_jinja/1_setup/A__setup.sql} (100%) rename demo/citibike_demo_jinja/{ => 2_test}/A__render.sql (100%) rename demo/citibike_demo_jinja/{ => 2_test}/R__render.sql (100%) rename demo/citibike_demo_jinja/{ => 2_test}/V1.0.0__render.sql (100%) rename demo/citibike_demo_jinja/{ => 2_test}/V1.1.0__initial_database_objects.sql (100%) rename demo/citibike_demo_jinja/{ => 2_test}/V1.2.0__load_tables_from_s3.sql (100%) rename demo/{teardown/citibike_demo_jinja/A__teardown_citibike_demo_jinja.sql => citibike_demo_jinja/3_teardown/A__teardown.sql} (100%) rename demo/{setup/basics_demo/schemachange-config.yml => schemachange-config-setup.yml} (63%) rename demo/{teardown/citibike_demo/schemachange-config.yml => schemachange-config-teardown.yml} (63%) delete mode 100644 demo/setup/citibike_demo/schemachange-config.yml delete mode 100644 demo/setup/citibike_demo_jinja/schemachange-config.yml delete mode 100644 demo/teardown/basics_demo/schemachange-config.yml delete mode 100644 demo/teardown/citibike_demo_jinja/schemachange-config.yml diff --git a/.github/workflows/master-pytest.yml b/.github/workflows/master-pytest.yml index 5caa505f..1cbe21b3 100644 --- a/.github/workflows/master-pytest.yml +++ b/.github/workflows/master-pytest.yml @@ -58,6 +58,19 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Create and populate connections.toml + run: | + touch connections.toml + echo [default] >> connections.toml + echo account = "$SNOWFLAKE_ACCOUNT" >> connections.toml + echo user = "$SNOWFLAKE_USER" >> connections.toml + echo role = "$SNOWFLAKE_ROLE" >> connections.toml + echo warehouse = "$SNOWFLAKE_WAREHOUSE" >> connections.toml + echo database = "$SNOWFLAKE_DATABASE" >> connections.toml + echo schema = "$MY_TARGET_SCHEMA" >> connections.toml + echo password = "$SCHEMACHANGE_SNOWFLAKE_PASSWORD" >> connections.toml + echo "cat connections.toml" + cat connections.toml - name: Test with pytest id: pytest run: | @@ -66,16 +79,39 @@ jobs: - name: Test Schemachange on ${{ matrix.os }} targeting ${{ env.SNOWFLAKE_DATABASE }}.${{ env.MY_TARGET_SCHEMA }} schema run: | echo "::group::Setting up ${MY_TARGET_SCHEMA}" - schemachange deploy --config-folder ./demo/setup/${SCENARIO_NAME} - echo "::endgroup::" + schemachange deploy \ + --config-folder ./demo \ + --config-file-name schemachange-config-setup.yml \ + --root-folder ./demo/${SCENARIO_NAME}/1_setup \ + --connection-name default \ + --connections-file-path connections.toml + echo "::endgroup::"' + echo "::group::Testing Rendering to ${MY_TARGET_SCHEMA}" - schemachange render --config-folder ./demo/${SCENARIO_NAME} ./demo/${SCENARIO_NAME}/A__render.sql - schemachange render --config-folder ./demo/${SCENARIO_NAME} ./demo/${SCENARIO_NAME}/R__render.sql - schemachange render --config-folder ./demo/${SCENARIO_NAME} ./demo/${SCENARIO_NAME}/V1.0.0__render.sql + schemachange render \ + --config-folder ./demo/${SCENARIO_NAME} \ + --connection-name default \ + --connections-file-path connections.toml \ + ./demo/${SCENARIO_NAME}/2_test/A__render.sql + schemachange render \ + --config-folder ./demo/${SCENARIO_NAME} \ + --connection-name default \ + --connections-file-path connections.toml \ + ./demo/${SCENARIO_NAME}/2_test/R__render.sql + schemachange render \ + --config-folder ./demo/${SCENARIO_NAME} \ + --connection-name default \ + --connections-file-path connections.toml + ./demo/${SCENARIO_NAME}/2_test/V1.0.0__render.sql echo "::endgroup::" + echo "::group::Testing Deployment using ${MY_TARGET_SCHEMA}" set +e - schemachange deploy --config-folder ./demo/${SCENARIO_NAME} + schemachange deploy \ + --config-folder ./demo/${SCENARIO_NAME} \ + --connection-name default \ + --connections-file-path connections.toml \ + --root-folder ./demo/${SCENARIO_NAME}/2_test RESULT=$? if [ $RESULT -eq 0 ]; then echo "Deployment Completed!" @@ -84,9 +120,16 @@ jobs: fi echo "::endgroup::" set -e + echo "::group::Tearing down up ${MY_TARGET_SCHEMA}" - schemachange deploy --config-folder ./demo/teardown/${SCENARIO_NAME} + schemachange deploy \ + --config-folder ./demo \ + --config-file-name schemachange-config-teardown.yml \ + --connection-name default \ + --connections-file-path connections.toml \ + --root-folder ./demo/${SCENARIO_NAME}/3_teardown \ echo "::endgroup::" + if [ $RESULT -ne 0 ]; then exit 1 fi diff --git a/demo/setup/basics_demo/A__setup_basics_demo.sql b/demo/basics_demo/1_setup/A__setup.sql similarity index 100% rename from demo/setup/basics_demo/A__setup_basics_demo.sql rename to demo/basics_demo/1_setup/A__setup.sql diff --git a/demo/basics_demo/A__basic001.sql b/demo/basics_demo/2_test/A__basic001.sql similarity index 100% rename from demo/basics_demo/A__basic001.sql rename to demo/basics_demo/2_test/A__basic001.sql diff --git a/demo/basics_demo/A__render.sql b/demo/basics_demo/2_test/A__render.sql similarity index 100% rename from demo/basics_demo/A__render.sql rename to demo/basics_demo/2_test/A__render.sql diff --git a/demo/basics_demo/R__basic001.sql b/demo/basics_demo/2_test/R__basic001.sql similarity index 100% rename from demo/basics_demo/R__basic001.sql rename to demo/basics_demo/2_test/R__basic001.sql diff --git a/demo/basics_demo/R__render.sql b/demo/basics_demo/2_test/R__render.sql similarity index 100% rename from demo/basics_demo/R__render.sql rename to demo/basics_demo/2_test/R__render.sql diff --git a/demo/basics_demo/V1.0.0__render.sql b/demo/basics_demo/2_test/V1.0.0__render.sql similarity index 100% rename from demo/basics_demo/V1.0.0__render.sql rename to demo/basics_demo/2_test/V1.0.0__render.sql diff --git a/demo/basics_demo/V1.0.1__EOF_FIle.sql b/demo/basics_demo/2_test/V1.0.1__EOF_FIle.sql similarity index 100% rename from demo/basics_demo/V1.0.1__EOF_FIle.sql rename to demo/basics_demo/2_test/V1.0.1__EOF_FIle.sql diff --git a/demo/basics_demo/V1.0.2__StoredProc.sql b/demo/basics_demo/2_test/V1.0.2__StoredProc.sql similarity index 100% rename from demo/basics_demo/V1.0.2__StoredProc.sql rename to demo/basics_demo/2_test/V1.0.2__StoredProc.sql diff --git a/demo/teardown/basics_demo/A__teardown_basics_demo.sql b/demo/basics_demo/3_teardown/A__teardown.sql similarity index 100% rename from demo/teardown/basics_demo/A__teardown_basics_demo.sql rename to demo/basics_demo/3_teardown/A__teardown.sql diff --git a/demo/basics_demo/schemachange-config.yml b/demo/basics_demo/schemachange-config.yml index 18680db4..7252e334 100644 --- a/demo/basics_demo/schemachange-config.yml +++ b/demo/basics_demo/schemachange-config.yml @@ -2,12 +2,6 @@ config-version: 1 root-folder: "./demo/{{ env_var('SCENARIO_NAME')}}" -snowflake-user: "{{ env_var('SNOWFLAKE_USER')}}" -snowflake-account: "{{ env_var('SNOWFLAKE_ACCOUNT')}}" -snowflake-role: "{{ env_var('SNOWFLAKE_ROLE')}}" -snowflake-warehouse: "{{ env_var('SNOWFLAKE_WAREHOUSE')}}" -snowflake-database: "{{ env_var('SNOWFLAKE_DATABASE')}}" -snowflake-schema: "{{ env_var('MY_TARGET_SCHEMA')}}" change-history-table: "{{ env_var('SNOWFLAKE_DATABASE')}}.{{ env_var('MY_TARGET_SCHEMA')}}.CHANGE_HISTORY" create-change-history-table: true diff --git a/demo/setup/citibike_demo/A__setup_citibike_demo.sql b/demo/citibike_demo/1_setup/A__setup.sql similarity index 100% rename from demo/setup/citibike_demo/A__setup_citibike_demo.sql rename to demo/citibike_demo/1_setup/A__setup.sql diff --git a/demo/citibike_demo/A__checks.sql b/demo/citibike_demo/2_test/A__checks.sql similarity index 100% rename from demo/citibike_demo/A__checks.sql rename to demo/citibike_demo/2_test/A__checks.sql diff --git a/demo/citibike_demo/A__render.sql b/demo/citibike_demo/2_test/A__render.sql similarity index 100% rename from demo/citibike_demo/A__render.sql rename to demo/citibike_demo/2_test/A__render.sql diff --git a/demo/citibike_demo/R__checks.sql b/demo/citibike_demo/2_test/R__checks.sql similarity index 100% rename from demo/citibike_demo/R__checks.sql rename to demo/citibike_demo/2_test/R__checks.sql diff --git a/demo/citibike_demo/R__render.sql b/demo/citibike_demo/2_test/R__render.sql similarity index 100% rename from demo/citibike_demo/R__render.sql rename to demo/citibike_demo/2_test/R__render.sql diff --git a/demo/citibike_demo/V1.0.0__render.sql b/demo/citibike_demo/2_test/V1.0.0__render.sql similarity index 100% rename from demo/citibike_demo/V1.0.0__render.sql rename to demo/citibike_demo/2_test/V1.0.0__render.sql diff --git a/demo/citibike_demo/V1.1.0__initial_database_objects.sql b/demo/citibike_demo/2_test/V1.1.0__initial_database_objects.sql similarity index 100% rename from demo/citibike_demo/V1.1.0__initial_database_objects.sql rename to demo/citibike_demo/2_test/V1.1.0__initial_database_objects.sql diff --git a/demo/citibike_demo/V1.2.0__load_tables_from_s3.sql b/demo/citibike_demo/2_test/V1.2.0__load_tables_from_s3.sql similarity index 100% rename from demo/citibike_demo/V1.2.0__load_tables_from_s3.sql rename to demo/citibike_demo/2_test/V1.2.0__load_tables_from_s3.sql diff --git a/demo/teardown/citibike_demo/A__teardown_citibike_demo.sql b/demo/citibike_demo/3_teardown/A__teardown.sql similarity index 100% rename from demo/teardown/citibike_demo/A__teardown_citibike_demo.sql rename to demo/citibike_demo/3_teardown/A__teardown.sql diff --git a/demo/citibike_demo/schemachange-config.yml b/demo/citibike_demo/schemachange-config.yml index 18680db4..7252e334 100644 --- a/demo/citibike_demo/schemachange-config.yml +++ b/demo/citibike_demo/schemachange-config.yml @@ -2,12 +2,6 @@ config-version: 1 root-folder: "./demo/{{ env_var('SCENARIO_NAME')}}" -snowflake-user: "{{ env_var('SNOWFLAKE_USER')}}" -snowflake-account: "{{ env_var('SNOWFLAKE_ACCOUNT')}}" -snowflake-role: "{{ env_var('SNOWFLAKE_ROLE')}}" -snowflake-warehouse: "{{ env_var('SNOWFLAKE_WAREHOUSE')}}" -snowflake-database: "{{ env_var('SNOWFLAKE_DATABASE')}}" -snowflake-schema: "{{ env_var('MY_TARGET_SCHEMA')}}" change-history-table: "{{ env_var('SNOWFLAKE_DATABASE')}}.{{ env_var('MY_TARGET_SCHEMA')}}.CHANGE_HISTORY" create-change-history-table: true diff --git a/demo/setup/citibike_demo_jinja/A__setup_citibike_demo_jinja.sql b/demo/citibike_demo_jinja/1_setup/A__setup.sql similarity index 100% rename from demo/setup/citibike_demo_jinja/A__setup_citibike_demo_jinja.sql rename to demo/citibike_demo_jinja/1_setup/A__setup.sql diff --git a/demo/citibike_demo_jinja/A__render.sql b/demo/citibike_demo_jinja/2_test/A__render.sql similarity index 100% rename from demo/citibike_demo_jinja/A__render.sql rename to demo/citibike_demo_jinja/2_test/A__render.sql diff --git a/demo/citibike_demo_jinja/R__render.sql b/demo/citibike_demo_jinja/2_test/R__render.sql similarity index 100% rename from demo/citibike_demo_jinja/R__render.sql rename to demo/citibike_demo_jinja/2_test/R__render.sql diff --git a/demo/citibike_demo_jinja/V1.0.0__render.sql b/demo/citibike_demo_jinja/2_test/V1.0.0__render.sql similarity index 100% rename from demo/citibike_demo_jinja/V1.0.0__render.sql rename to demo/citibike_demo_jinja/2_test/V1.0.0__render.sql diff --git a/demo/citibike_demo_jinja/V1.1.0__initial_database_objects.sql b/demo/citibike_demo_jinja/2_test/V1.1.0__initial_database_objects.sql similarity index 100% rename from demo/citibike_demo_jinja/V1.1.0__initial_database_objects.sql rename to demo/citibike_demo_jinja/2_test/V1.1.0__initial_database_objects.sql diff --git a/demo/citibike_demo_jinja/V1.2.0__load_tables_from_s3.sql b/demo/citibike_demo_jinja/2_test/V1.2.0__load_tables_from_s3.sql similarity index 100% rename from demo/citibike_demo_jinja/V1.2.0__load_tables_from_s3.sql rename to demo/citibike_demo_jinja/2_test/V1.2.0__load_tables_from_s3.sql diff --git a/demo/teardown/citibike_demo_jinja/A__teardown_citibike_demo_jinja.sql b/demo/citibike_demo_jinja/3_teardown/A__teardown.sql similarity index 100% rename from demo/teardown/citibike_demo_jinja/A__teardown_citibike_demo_jinja.sql rename to demo/citibike_demo_jinja/3_teardown/A__teardown.sql diff --git a/demo/citibike_demo_jinja/schemachange-config.yml b/demo/citibike_demo_jinja/schemachange-config.yml index 0cd98e41..88cac3ed 100644 --- a/demo/citibike_demo_jinja/schemachange-config.yml +++ b/demo/citibike_demo_jinja/schemachange-config.yml @@ -3,12 +3,6 @@ config-version: 1 root-folder: "./demo/{{ env_var('SCENARIO_NAME')}}" modules-folder: "./demo/{{ env_var('SCENARIO_NAME')}}/modules" -snowflake-user: "{{ env_var('SNOWFLAKE_USER')}}" -snowflake-account: "{{ env_var('SNOWFLAKE_ACCOUNT')}}" -snowflake-role: "{{ env_var('SNOWFLAKE_ROLE')}}" -snowflake-warehouse: "{{ env_var('SNOWFLAKE_WAREHOUSE')}}" -snowflake-database: "{{ env_var('SNOWFLAKE_DATABASE')}}" -snowflake-schema: "{{ env_var('MY_TARGET_SCHEMA')}}" change-history-table: "{{ env_var('SNOWFLAKE_DATABASE')}}.{{ env_var('MY_TARGET_SCHEMA')}}.CHANGE_HISTORY" create-change-history-table: true diff --git a/demo/setup/basics_demo/schemachange-config.yml b/demo/schemachange-config-setup.yml similarity index 63% rename from demo/setup/basics_demo/schemachange-config.yml rename to demo/schemachange-config-setup.yml index 16a4c464..e68543cb 100644 --- a/demo/setup/basics_demo/schemachange-config.yml +++ b/demo/schemachange-config-setup.yml @@ -2,11 +2,6 @@ config-version: 1 root-folder: "./demo/setup/{{ env_var('SCENARIO_NAME')}}" -snowflake-user: "{{ env_var('SNOWFLAKE_USER')}}" -snowflake-account: "{{ env_var('SNOWFLAKE_ACCOUNT')}}" -snowflake-role: "{{ env_var('SNOWFLAKE_ROLE')}}" -snowflake-warehouse: "{{ env_var('SNOWFLAKE_WAREHOUSE')}}" -snowflake-database: "{{ env_var('SNOWFLAKE_DATABASE')}}" # tracking the setup step in a different change history table to use schemachange setup and teardown separate from deployment. change-history-table: "{{ env_var('SNOWFLAKE_DATABASE')}}.SCHEMACHANGE.{{ env_var('SCENARIO_NAME')}}_CHANGE_HISTORY" create-change-history-table: true diff --git a/demo/teardown/citibike_demo/schemachange-config.yml b/demo/schemachange-config-teardown.yml similarity index 63% rename from demo/teardown/citibike_demo/schemachange-config.yml rename to demo/schemachange-config-teardown.yml index d4f8fc00..800415a0 100644 --- a/demo/teardown/citibike_demo/schemachange-config.yml +++ b/demo/schemachange-config-teardown.yml @@ -2,11 +2,6 @@ config-version: 1 root-folder: "./demo/teardown/{{ env_var('SCENARIO_NAME')}}" -snowflake-user: "{{ env_var('SNOWFLAKE_USER')}}" -snowflake-account: "{{ env_var('SNOWFLAKE_ACCOUNT')}}" -snowflake-role: "{{ env_var('SNOWFLAKE_ROLE')}}" -snowflake-warehouse: "{{ env_var('SNOWFLAKE_WAREHOUSE')}}" -snowflake-database: "{{ env_var('SNOWFLAKE_DATABASE')}}" # tracking the setup step in a different change history table to use schemachange setup and teardown separate from deployment. change-history-table: "{{ env_var('SNOWFLAKE_DATABASE')}}.SCHEMACHANGE.{{ env_var('SCENARIO_NAME')}}_CHANGE_HISTORY" create-change-history-table: true diff --git a/demo/setup/citibike_demo/schemachange-config.yml b/demo/setup/citibike_demo/schemachange-config.yml deleted file mode 100644 index 16a4c464..00000000 --- a/demo/setup/citibike_demo/schemachange-config.yml +++ /dev/null @@ -1,16 +0,0 @@ -config-version: 1 - -root-folder: "./demo/setup/{{ env_var('SCENARIO_NAME')}}" - -snowflake-user: "{{ env_var('SNOWFLAKE_USER')}}" -snowflake-account: "{{ env_var('SNOWFLAKE_ACCOUNT')}}" -snowflake-role: "{{ env_var('SNOWFLAKE_ROLE')}}" -snowflake-warehouse: "{{ env_var('SNOWFLAKE_WAREHOUSE')}}" -snowflake-database: "{{ env_var('SNOWFLAKE_DATABASE')}}" -# tracking the setup step in a different change history table to use schemachange setup and teardown separate from deployment. -change-history-table: "{{ env_var('SNOWFLAKE_DATABASE')}}.SCHEMACHANGE.{{ env_var('SCENARIO_NAME')}}_CHANGE_HISTORY" -create-change-history-table: true - -vars: - database_name: "{{env_var('SNOWFLAKE_DATABASE')}}" - schema_name: "{{env_var('MY_TARGET_SCHEMA')}}" diff --git a/demo/setup/citibike_demo_jinja/schemachange-config.yml b/demo/setup/citibike_demo_jinja/schemachange-config.yml deleted file mode 100644 index 16a4c464..00000000 --- a/demo/setup/citibike_demo_jinja/schemachange-config.yml +++ /dev/null @@ -1,16 +0,0 @@ -config-version: 1 - -root-folder: "./demo/setup/{{ env_var('SCENARIO_NAME')}}" - -snowflake-user: "{{ env_var('SNOWFLAKE_USER')}}" -snowflake-account: "{{ env_var('SNOWFLAKE_ACCOUNT')}}" -snowflake-role: "{{ env_var('SNOWFLAKE_ROLE')}}" -snowflake-warehouse: "{{ env_var('SNOWFLAKE_WAREHOUSE')}}" -snowflake-database: "{{ env_var('SNOWFLAKE_DATABASE')}}" -# tracking the setup step in a different change history table to use schemachange setup and teardown separate from deployment. -change-history-table: "{{ env_var('SNOWFLAKE_DATABASE')}}.SCHEMACHANGE.{{ env_var('SCENARIO_NAME')}}_CHANGE_HISTORY" -create-change-history-table: true - -vars: - database_name: "{{env_var('SNOWFLAKE_DATABASE')}}" - schema_name: "{{env_var('MY_TARGET_SCHEMA')}}" diff --git a/demo/teardown/basics_demo/schemachange-config.yml b/demo/teardown/basics_demo/schemachange-config.yml deleted file mode 100644 index d4f8fc00..00000000 --- a/demo/teardown/basics_demo/schemachange-config.yml +++ /dev/null @@ -1,16 +0,0 @@ -config-version: 1 - -root-folder: "./demo/teardown/{{ env_var('SCENARIO_NAME')}}" - -snowflake-user: "{{ env_var('SNOWFLAKE_USER')}}" -snowflake-account: "{{ env_var('SNOWFLAKE_ACCOUNT')}}" -snowflake-role: "{{ env_var('SNOWFLAKE_ROLE')}}" -snowflake-warehouse: "{{ env_var('SNOWFLAKE_WAREHOUSE')}}" -snowflake-database: "{{ env_var('SNOWFLAKE_DATABASE')}}" -# tracking the setup step in a different change history table to use schemachange setup and teardown separate from deployment. -change-history-table: "{{ env_var('SNOWFLAKE_DATABASE')}}.SCHEMACHANGE.{{ env_var('SCENARIO_NAME')}}_CHANGE_HISTORY" -create-change-history-table: true - -vars: - database_name: "{{env_var('SNOWFLAKE_DATABASE')}}" - schema_name: "{{env_var('MY_TARGET_SCHEMA')}}" diff --git a/demo/teardown/citibike_demo_jinja/schemachange-config.yml b/demo/teardown/citibike_demo_jinja/schemachange-config.yml deleted file mode 100644 index d4f8fc00..00000000 --- a/demo/teardown/citibike_demo_jinja/schemachange-config.yml +++ /dev/null @@ -1,16 +0,0 @@ -config-version: 1 - -root-folder: "./demo/teardown/{{ env_var('SCENARIO_NAME')}}" - -snowflake-user: "{{ env_var('SNOWFLAKE_USER')}}" -snowflake-account: "{{ env_var('SNOWFLAKE_ACCOUNT')}}" -snowflake-role: "{{ env_var('SNOWFLAKE_ROLE')}}" -snowflake-warehouse: "{{ env_var('SNOWFLAKE_WAREHOUSE')}}" -snowflake-database: "{{ env_var('SNOWFLAKE_DATABASE')}}" -# tracking the setup step in a different change history table to use schemachange setup and teardown separate from deployment. -change-history-table: "{{ env_var('SNOWFLAKE_DATABASE')}}.SCHEMACHANGE.{{ env_var('SCENARIO_NAME')}}_CHANGE_HISTORY" -create-change-history-table: true - -vars: - database_name: "{{env_var('SNOWFLAKE_DATABASE')}}" - schema_name: "{{env_var('MY_TARGET_SCHEMA')}}"