Skip to content

Commit

Permalink
refactor(integration_tests): move environment variable usage from dbt…
Browse files Browse the repository at this point in the history
…_project.yml to integration_tests.yml for better encapsulation

fix(integration_tests): remove hardcoded database and schema names from dbt_project.yml to allow for dynamic configuration
  • Loading branch information
arthurcerqueiraindicium committed Apr 11, 2024
1 parent a0a4461 commit 20bc35d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,13 @@ jobs:
dbt deps
- name: Integration Test - Snowflake
run: cd integration_tests && dbt build --target snowflake
run: |
cd integration_tests
dbt build --target snowflake --vars "
databricks_billing_database: $SNOWFLAKE_TEST_DATABASE
databricks_billing_schema: $SNOWFLAKE_TEST_SCHEMA
seeds:
databricks_billing:
+database: $SNOWFLAKE_TEST_DATABASE
+schema: $SNOWFLAKE_TEST_SCHEMA
"
6 changes: 2 additions & 4 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ models:

seeds:
databricks_billing:
+database: "{{ env_var('SNOWFLAKE_TEST_DATABASE') }}"
+tags: integration_tests
+schema: "{{ env_var('SNOWFLAKE_TEST_SCHEMA') }}"

vars:
databricks_billing_database: "{{ env_var('SNOWFLAKE_TEST_DATABASE') }}"
databricks_billing_schema: "{{ env_var('SNOWFLAKE_TEST_SCHEMA') }}"
databricks_billing_database:
databricks_billing_schema:

0 comments on commit 20bc35d

Please sign in to comment.