Skip to content

Commit

Permalink
testing rendering option in schemachange as well
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-tmathew committed May 6, 2024
1 parent 17c1245 commit fe2a874
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/dev-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,18 @@ jobs:
if: ${{ matrix.os != 'windows-latest' }}
run: |
echo "::group::Setting up ${MY_TARGET_SCHEMA}"
schemachange --config-folder ./demo/setup/${SCENARIO_NAME}
schemachange deploy --config-folder ./demo/setup/${SCENARIO_NAME}
echo "::endgroup::"
echo "::group::Testing Rendering to ${MY_TARGET_SCHEMA}"
echo "Work in Progress - To be Tested"
schemachange render --config-folder ./demo/${SCENARIO_NAME} A__render.sql
schemachange render --config-folder ./demo/${SCENARIO_NAME} R__render.sql
schemachange render --config-folder ./demo/${SCENARIO_NAME} V1.0.0__render.sql
echo "::endgroup::"
echo "::group::Testing Deployment using ${MY_TARGET_SCHEMA}"
schemachange --config-folder ./demo/${SCENARIO_NAME}
schemachange deploy --config-folder ./demo/${SCENARIO_NAME}
echo "::endgroup::"
echo "::group::Tearing down up ${MY_TARGET_SCHEMA}"
schemachange --config-folder ./demo/teardown/${SCENARIO_NAME}
schemachange deploy --config-folder ./demo/teardown/${SCENARIO_NAME}
echo "::endgroup::"
- name: Test Schemachange on ${{ matrix.os }} targeting ${{ env.SNOWFLAKE_DATABASE }}.${{ env.MY_TARGET_SCHEMA }} schema
if: ${{ matrix.os == 'windows-latest' }}
Expand All @@ -66,7 +68,9 @@ jobs:
schemachange --config-folder "./demo/setup/$Env:SCENARIO_NAME"
echo "::endgroup::"
echo "::group::Testing Rendering to $Env:MY_TARGET_SCHEMA"
echo "Work in Progress - To be Tested"
schemachange render --config-folder ./demo/$Env:SCENARIO_NAME A__render.sql
schemachange render --config-folder ./demo/$Env:SCENARIO_NAME R__render.sql
schemachange render --config-folder ./demo/$Env:SCENARIO_NAME V1.0.0__render.sql
echo "::endgroup::"
echo "::group::Testing Deployment using $Env:MY_TARGET_SCHEMA"
schemachange --config-folder "./demo/$Env:SCENARIO_NAME"
Expand Down
4 changes: 4 additions & 0 deletions demo/basics_demo/A__render.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
use database {{ database_name }};
use schema {{ schema_name }};

use role IDENTIFIER('{{ env_var('SNOWFLAKE_ROLE')}}');
File renamed without changes.
2 changes: 2 additions & 0 deletions demo/basics_demo/V1.0.0__render.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
use database {{ database_name }};
use schema {{ schema_name }};
2 changes: 2 additions & 0 deletions demo/citibike_demo/A__render.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
use database {{ database_name }};
use schema {{ schema_name }};
2 changes: 2 additions & 0 deletions demo/citibike_demo/R__render.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
use database {{ database_name }};
use schema {{ schema_name }};
2 changes: 2 additions & 0 deletions demo/citibike_demo/V1.0.0__render.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
use database {{ database_name }};
use schema {{ schema_name }};
2 changes: 2 additions & 0 deletions demo/citibike_demo_jinja/scripts/A__render.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
use database {{ database_name }};
use schema {{ schema_name }};
2 changes: 2 additions & 0 deletions demo/citibike_demo_jinja/scripts/R__render.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
use database {{ database_name }};
use schema {{ schema_name }};
2 changes: 2 additions & 0 deletions demo/citibike_demo_jinja/scripts/V1.0.0__render.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
use database {{ database_name }};
use schema {{ schema_name }};

0 comments on commit fe2a874

Please sign in to comment.