Skip to content

Commit

Permalink
add synapse testing
Browse files Browse the repository at this point in the history
  • Loading branch information
dataders committed Dec 18, 2024
1 parent 451ff5a commit b10e53d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
13 changes: 8 additions & 5 deletions integration_tests/profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,14 @@ integration_tests:

synapse:
type: synapse
driver: "ODBC Driver 17 for SQL Server"
port: 1433
host: "{{ env_var('SYNAPSE_TEST_SERVER') }}.sql.azuresynapse.net"
database: "{{ env_var('SYNAPSE_TEST_DBNAME') }}"
authentication: CLI
driver: "{{ env_var('SYNAPSE_DRIVER') }}"
port: "{{ env_var('SYNAPSE_PORT') }}"
host: "{{ env_var('SYNAPSE_HOST') }}"
database: "{{ env_var('SYNAPSE_DATABASE') }}"
authentication: "{{ env_var('SYNAPSE_AUTHENTICATION') }}"
tenant_id: "{{ env_var('SYNAPSE_TENANT_ID') }}"
client_id: "{{ env_var('SYNAPSE_CLIENT_ID') }}"
client_secret: "{{ env_var('SYNAPSE_CLIENT_SECRET') }}"
schema: dbt_external_tables_integration_tests_synapse
threads: 1

Expand Down
17 changes: 16 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,19 @@ commands =
dbt run-operation prep_external --target bigquery
dbt run-operation dbt_external_tables.stage_external_sources --vars 'ext_full_refresh: true' --target bigquery
dbt run-operation dbt_external_tables.stage_external_sources --target bigquery
dbt test --target bigquery
dbt test --target bigquery

# run dbt commands directly, assumes dbt is already installed in environment
[testenv:dbt_integration_synapse]
changedir = integration_tests
allowlist_externals =
dbt
skip_install = true
commands =
dbt deps --target synapse
dbt seed --full-refresh --target synapse
dbt run --target synapse
dbt run-operation prep_external --target synapse
dbt run-operation dbt_external_tables.stage_external_sources --vars 'ext_full_refresh: true' --target synapse
dbt run-operation dbt_external_tables.stage_external_sources --target synapse
dbt test --target synapse

0 comments on commit b10e53d

Please sign in to comment.