Skip to content

Commit

Permalink
feat(integration_tests): add Databricks integration tests
Browse files Browse the repository at this point in the history
chore(integration_tests): add Databricks environment variables to GitHub workflow
feat(profiles.yml): add Databricks profile configuration
chore(requirements.txt): add dbt-databricks to requirements for integration tests
  • Loading branch information
arthurcerqueiraindicium committed Apr 15, 2024
1 parent ea48925 commit 77e23c5
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,15 @@ jobs:
SNOWFLAKE_TEST_WAREHOUSE: ${{ vars.SNOWFLAKE_TEST_WAREHOUSE }}
SNOWFLAKE_TEST_SCHEMA: ${{ vars.SNOWFLAKE_TEST_SCHEMA }}

DATABRICKS_TEST_CATALOG: ${{ vars.DATABRICKS_TEST_CATALOG }}
DATABRICKS_TEST_SCHEMA: ${{ vars.DATABRICKS_TEST_SCHEMA }}
DATABRICKS_TEST_HOST: ${{ vars.DATABRICKS_TEST_HOST }}
DATABRICKS_TEST_HTTP_PATH: ${{ vars.DATABRICKS_TEST_HTTP_PATH }}
DATABRICKS_TEST_TOKEN: ${{ secrets.DATABRICKS_TEST_TOKEN }}

steps:
- uses: actions/checkout@v2



- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
Expand All @@ -45,3 +50,15 @@ jobs:
+database: $SNOWFLAKE_TEST_DATABASE
+schema: $SNOWFLAKE_TEST_SCHEMA
"
- name: Integration Test - Databricks
run: |
cd integration_tests
dbt build --target databricks --vars "
databricks_billing_database: $DATABRICKS_TEST_CATALOG
databricks_billing_schema: $DATABRICKS_TEST_SCHEMA
seeds:
databricks_billing:
+database: $DATABRICKS_TEST_CATALOG
+schema: $DATABRICKS_TEST_SCHEMA
"
9 changes: 9 additions & 0 deletions integration_tests/profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,13 @@ integration_tests:
database: "{{ env_var('SNOWFLAKE_TEST_DATABASE') }}"
warehouse: "{{ env_var('SNOWFLAKE_TEST_WAREHOUSE') }}"
schema: "{{ env_var('SNOWFLAKE_TEST_SCHEMA') }}"
threads: 5

databricks:
type: databricks
catalog: "{{ env_var('DATABRICKS_TEST_CATALOG') }}"
schema: "{{ env_var('DATABRICKS_TEST_SCHEMA') }}"
host: "{{ env_var('DATABRICKS_TEST_HOST') }}"
http_path: "{{ env_var('DATABRICKS_TEST_HTTP_PATH') }}"
token: "{{ env_var('DATABRICKS_TEST_TOKEN') }}"
threads: 5
3 changes: 2 additions & 1 deletion integration_tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dbt-snowflake>=1.3.0,<2.0.0
dbt-snowflake>=1.3.0,<2.0.0
dbt-databricks==1.7.1

0 comments on commit 77e23c5

Please sign in to comment.