Skip to content

Commit 57f5f15

Browse files
authored
add dbt integration tests (#812)
* add dbt integration tests * add gitignore and env_example files * change the database creation
1 parent f127ad8 commit 57f5f15

File tree

9 files changed

+472
-0
lines changed

9 files changed

+472
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
3+
export DBT_TARGET=embucket
4+
5+
export EMBUCKET_HOST=localhost
6+
export EMBUCKET_PORT=3000
7+
export EMBUCKET_PROTOCOL=http
8+
export EMBUCKET_ACCOUNT=test
9+
export EMBUCKET_USER=test
10+
export EMBUCKET_PASSWORD=test
11+
export EMBUCKET_ROLE=SYSADMIN
12+
export EMBUCKET_DATABASE=embucket
13+
export EMBUCKET_WAREHOUSE=COMPUTE_WH
14+
export EMBUCKET_SCHEMA=public
15+
16+
17+
export SNOWFLAKE_ACCOUNT=
18+
export SNOWFLAKE_USER=
19+
export DBT_ENV_SECRET_SNOWFLAKE_PASS=
20+
export SNOWFLAKE_ROLE=
21+
export SNOWFLAKE_DATABASE=
22+
export SNOWFLAKE_WAREHOUSE=
23+
export SNOWFLAKE_SCHEMA=
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.env
2+
.user.yml
3+
target/
4+
data/
5+
packages/
6+
logs/
7+
.DS_Store
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# DBT integration tests
2+
3+
1. Copy .env_example inside dbt_integration_tests/packages_integration_tests folder file and rename it to .env file.
4+
5+
2. Set up a connection
6+
1. Snowflake - replace Snowflake credentials in .env file from test to your credentials.
7+
2. Embucket - launch Embucket locally, make sure connection parameters match Embucket launch parameters (if you have default settings, you don't need to change anything).
8+
3. Set the target database DBT_TARGET env (embucket or snowflake) by default it will be embucket
9+
10+
3. Make the sh file executable
11+
```sh
12+
chmod +x run_test.sh
13+
```
14+
15+
4. Run integration test
16+
```sh
17+
./run_test.sh
18+
```
19+
20+
In repos.yml there are packages with integrations tests. By default it runs integrations tests from the dbt-snowplow-web package.
21+
Feel free to test any package from the repos_full_list.yml file.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
default:
2+
target: embucket
3+
outputs:
4+
snowflake:
5+
type: snowflake
6+
threads: 4
7+
account: "{{ env_var('SNOWFLAKE_ACCOUNT') }}"
8+
user: "{{ env_var('SNOWFLAKE_USER') }}"
9+
password: "{{ env_var('DBT_ENV_SECRET_SNOWFLAKE_PASS') }}"
10+
database: "{{ env_var('SNOWFLAKE_DATABASE') }}"
11+
role: "{{ env_var('SNOWFLAKE_ROLE') }}"
12+
warehouse: "{{ env_var('SNOWFLAKE_WAREHOUSE') }}"
13+
schema: "{{ env_var('SNOWFLAKE_SCHEMA') }}"
14+
client_session_keep_alive: True
15+
16+
embucket:
17+
type: snowflake
18+
host: "{{ env_var('EMBUCKET_HOST') }}"
19+
port: 3000
20+
protocol: "{{ env_var('EMBUCKET_PROTOCOL') }}"
21+
account: "test"
22+
user: "{{ env_var('EMBUCKET_USER') }}"
23+
password: "{{ env_var('EMBUCKET_PASSWORD') }}"
24+
role: "{{ env_var('EMBUCKET_ROLE') }}"
25+
database: "embucket"
26+
warehouse: "{{ env_var('EMBUCKET_WAREHOUSE') }}"
27+
schema: "{{ env_var('EMBUCKET_SCHEMA') }}"
28+
threads: 32
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
https://github.com/snowplow/dbt-snowplow-web.git
2+
#https://github.com/dbt-labs/dbt-utils.git
3+
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
https://github.com/fivetran/dbt_ad_reporting.git
2+
https://github.com/fivetran/dbt_amazon_ads.git
3+
https://github.com/fivetran/dbt_amazon_ads_source.git
4+
https://github.com/fivetran/dbt_amazon_selling_partner.git
5+
https://github.com/fivetran/dbt_amplitude.git
6+
https://github.com/fivetran/dbt_amplitude_source.git
7+
https://github.com/fivetran/dbt_app_reporting.git
8+
https://github.com/fivetran/dbt_apple_search_ads.git
9+
https://github.com/fivetran/dbt_apple_search_ads_source.git
10+
https://github.com/fivetran/dbt_apple_store.git
11+
https://github.com/fivetran/dbt_apple_store_source.git
12+
https://github.com/fivetran/dbt_asana.git
13+
https://github.com/fivetran/dbt_asana_source.git
14+
https://github.com/fivetran/dbt_aws_cloud_cost.git
15+
https://github.com/fivetran/dbt_dynamics_365_crm.git
16+
https://github.com/fivetran/dbt_facebook_ads.git
17+
https://github.com/fivetran/dbt_facebook_ads_creative_history.git
18+
https://github.com/fivetran/dbt_facebook_ads_source.git
19+
https://github.com/fivetran/dbt_facebook_pages.git
20+
https://github.com/fivetran/dbt_facebook_pages_source.git
21+
https://github.com/fivetran/dbt_fivetran_log.git
22+
https://github.com/fivetran/dbt_fivetran_utils.git
23+
https://github.com/fivetran/dbt_ga4_export.git
24+
https://github.com/fivetran/dbt_github.git
25+
https://github.com/fivetran/dbt_github_source.git
26+
https://github.com/fivetran/dbt_google_ads.git
27+
https://github.com/fivetran/dbt_google_ads_source.git
28+
https://github.com/fivetran/dbt_google_play.git
29+
https://github.com/fivetran/dbt_google_play_source.git
30+
https://github.com/fivetran/dbt_greenhouse.git
31+
https://github.com/fivetran/dbt_greenhouse_source.git
32+
https://github.com/fivetran/dbt_hubspot.git
33+
https://github.com/fivetran/dbt_hubspot_source.git
34+
https://github.com/fivetran/dbt_instagram_business.git
35+
https://github.com/fivetran/dbt_instagram_business_source.git
36+
https://github.com/fivetran/dbt_intercom.git
37+
https://github.com/fivetran/dbt_intercom_source.git
38+
https://github.com/fivetran/dbt_iterable.git
39+
https://github.com/fivetran/dbt_iterable_source.git
40+
https://github.com/fivetran/dbt_jira.git
41+
https://github.com/fivetran/dbt_jira_source.git
42+
https://github.com/fivetran/dbt_klaviyo.git
43+
https://github.com/fivetran/dbt_klaviyo_source.git
44+
https://github.com/fivetran/dbt_lever.git
45+
https://github.com/fivetran/dbt_lever_source.git
46+
https://github.com/fivetran/dbt_linkedin.git
47+
https://github.com/fivetran/dbt_linkedin_pages.git
48+
https://github.com/fivetran/dbt_linkedin_pages_source.git
49+
https://github.com/fivetran/dbt_linkedin_source.git
50+
https://github.com/fivetran/dbt_mailchimp.git
51+
https://github.com/fivetran/dbt_mailchimp_source.git
52+
https://github.com/fivetran/dbt_marketo.git
53+
https://github.com/fivetran/dbt_marketo_source.git
54+
https://github.com/fivetran/dbt_microsoft_ads.git
55+
https://github.com/fivetran/dbt_microsoft_ads_source.git
56+
https://github.com/fivetran/dbt_mixpanel.git
57+
https://github.com/fivetran/dbt_netsuite.git
58+
https://github.com/fivetran/dbt_netsuite_source.git
59+
https://github.com/fivetran/dbt_pardot.git
60+
https://github.com/fivetran/dbt_pardot_source.git
61+
https://github.com/fivetran/dbt_pendo.git
62+
https://github.com/fivetran/dbt_pendo_source.git
63+
https://github.com/fivetran/dbt_pinterest.git
64+
https://github.com/fivetran/dbt_pinterest_source.git
65+
https://github.com/fivetran/dbt_qualtrics.git
66+
https://github.com/fivetran/dbt_qualtrics_source.git
67+
https://github.com/fivetran/dbt_quickbooks.git
68+
https://github.com/fivetran/dbt_quickbooks_source.git
69+
https://github.com/fivetran/dbt_recharge.git
70+
https://github.com/fivetran/dbt_recharge_source.git
71+
https://github.com/fivetran/dbt_recurly.git
72+
https://github.com/fivetran/dbt_recurly_source.git
73+
https://github.com/fivetran/dbt_reddit_ads.git
74+
https://github.com/fivetran/dbt_reddit_ads_source.git
75+
https://github.com/fivetran/dbt_sage_intacct.git
76+
https://github.com/fivetran/dbt_sage_intacct_source.git
77+
https://github.com/fivetran/dbt_salesforce.git
78+
https://github.com/fivetran/dbt_salesforce_formula_utils.git
79+
https://github.com/fivetran/dbt_salesforce_marketing_cloud.git
80+
https://github.com/fivetran/dbt_salesforce_source.git
81+
https://github.com/fivetran/dbt_sap.git
82+
https://github.com/fivetran/dbt_sap_source.git
83+
https://github.com/fivetran/dbt_servicenow.git
84+
https://github.com/fivetran/dbt_shopify.git
85+
https://github.com/fivetran/dbt_shopify_holistic_reporting.git
86+
https://github.com/fivetran/dbt_shopify_source.git
87+
https://github.com/fivetran/dbt_snapchat_ads.git
88+
https://github.com/fivetran/dbt_snapchat_ads_source.git
89+
https://github.com/fivetran/dbt_social_media_reporting.git
90+
https://github.com/fivetran/dbt_stripe.git
91+
https://github.com/fivetran/dbt_stripe_source.git
92+
https://github.com/fivetran/dbt_tiktok_ads.git
93+
https://github.com/fivetran/dbt_tiktok_ads_source.git
94+
https://github.com/fivetran/dbt_twilio.git
95+
https://github.com/fivetran/dbt_twilio_source.git
96+
https://github.com/fivetran/dbt_twitter.git
97+
https://github.com/fivetran/dbt_twitter_source.git
98+
https://github.com/fivetran/dbt_twitter_organic.git
99+
https://github.com/fivetran/dbt_twitter_organic_source.git
100+
https://github.com/fivetran/dbt_unified_rag.git
101+
https://github.com/fivetran/dbt_workday.git
102+
https://github.com/fivetran/dbt_xero.git
103+
https://github.com/fivetran/dbt_xero_source.git
104+
https://github.com/fivetran/dbt_youtube_analytics.git
105+
https://github.com/fivetran/dbt_youtube_analytics_source.git
106+
https://github.com/fivetran/dbt_zendesk.git
107+
https://github.com/fivetran/dbt_zendesk_source.git
108+
https://github.com/fivetran/dbt_zuora.git
109+
https://github.com/fivetran/dbt_zuora_source.git
110+
https://github.com/Fleetio/dbt-segment.git
111+
https://github.com/fullstorydev/dbt_fullstory.git
112+
https://github.com/get-select/dbt-snowflake-query-tags.git
113+
https://github.com/godatadriven/dbt-date.git
114+
https://github.com/google/fhir-dbt-utils.git
115+
https://github.com/infinitelambda/dbt-audit-helper-ext.git
116+
https://github.com/infinitelambda/dbt-data-diff.git
117+
https://github.com/infinitelambda/dbt-alert.git
118+
https://github.com/infinitelambda/dbt-tags.git
119+
https://github.com/infinitelambda/dq-tools.git
120+
https://github.com/infinitelambda/dq-vault.git
121+
https://github.com/jmangroup/data_profiler.git
122+
https://github.com/jpmmcneill/dbt-graph-theory.git
123+
https://github.com/kgmcquate/dbt-testgen.git
124+
https://github.com/LewisDavies/upstream-prod.git
125+
https://github.com/MaterializeInc/materialize-dbt-utils.git
126+
https://github.com/Matts52/dbt-ml-inline-preprocessing.git
127+
https://github.com/Matts52/dbt-set-similarity.git
128+
https://github.com/metaplane/dbt-expectations.git
129+
https://github.com/mjirv/dbt-datamocktool.git
130+
https://github.com/mjirv/dbt_product_analytics.git
131+
https://github.com/narratorai/dbt-activity-schema.git
132+
https://github.com/oleg-solovyev/dbt_facebook_ads.git
133+
https://github.com/omnata-labs/dbt-ml-preprocessing.git
134+
https://github.com/pvcy/dbt-privacy.git
135+
https://github.com/re-data/dbt-re-data.git
136+
https://github.com/rjh336/dbt-model-usage.git
137+
https://github.com/rlsalcido24/lakehouse_utils.git
138+
https://github.com/Snowflake-Labs/dbt_constraints.git
139+
https://github.com/snowplow/dbt-snowplow-attribution.git
140+
https://github.com/snowplow/dbt-snowplow-ecommerce.git
141+
https://github.com/snowplow/dbt-snowplow-fractribution.git
142+
https://github.com/snowplow/dbt-snowplow-media-player.git
143+
https://github.com/snowplow/dbt-snowplow-mobile.git
144+
https://github.com/snowplow/dbt-snowplow-normalize.git
145+
https://github.com/snowplow/dbt-snowplow-unified.git
146+
https://github.com/snowplow/dbt-snowplow-utils.git
147+
https://github.com/snowplow/dbt-snowplow-web.git
148+
https://github.com/starburstdata/dbt-trino-utils.git
149+
https://github.com/sutrolabs/dbt_census_utils.git
150+
https://github.com/TasmanAnalytics/tasman-dbt-mta.git
151+
https://github.com/TasmanAnalytics/tasman-dbt-revenuecat.git
152+
https://github.com/TasmanAnalytics/tasman-identity-graph.git
153+
https://github.com/techindicium/dbt-metalog.git
154+
https://github.com/tnightengale/dbt-activity-schema.git
155+
https://github.com/tnightengale/dbt-meta-testing.git
156+
https://github.com/tuva-health/the_tuva_project.git
157+
https://github.com/windsor-ai/dbt_facebook_ads.git
158+
https://github.com/yu-iskw/dbt-airflow-macros.git
159+
https://github.com/yu-iskw/dbt-gcp-billing.git
160+
https://github.com/yu-iskw/dbt-ops.git
161+
https://github.com/yu-iskw/dbt-unittest.git
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
requests
2+
snowflake-connector-python

0 commit comments

Comments
 (0)