Skip to content

Commit

Permalink
Add environment variables related to project variables so models are …
Browse files Browse the repository at this point in the history
…enabled for CI
  • Loading branch information
davidbooke4 committed Nov 4, 2024
1 parent 845e1df commit 48f2a14
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/run_unit_tests_on_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ env:
BIGQUERY_PROPERTY_ID: ${{ secrets.BIGQUERY_PROPERTY_ID }}
BIGQUERY_DATASET: ${{ secrets.BIGQUERY_DATASET }}
BIGQUERY_KEYFILE: ./unit_tests/dbt-service-account.json
GA4_CONVERSION_EVENTS: ${{ vars.GA4_CONVERSION_EVENTS }}
GA4_DERIVED_SESSION_PROPERTIES: ${{ vars.GA4_DERIVED_SESSION_PROPERTIES }}
GA4_DERIVED_USER_PROPERTIES: ${{ vars.GA4_DERIVED_USER_PROPERTIES }}

jobs:
pytest_run_all:
Expand Down
2 changes: 1 addition & 1 deletion models/staging/stg_ga4__derived_session_properties.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ config(
enabled = true if var('derived_session_properties', false) else false,
enabled = true if var('derived_session_properties', false) or env_var('GA4_DERIVED_SESSION_PROPERTIES', false) else false,
materialized = "table"
) }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% endfor %}
{{
config(
enabled = true if var('derived_session_properties', false) else false,
enabled = true if var('derived_session_properties', false) or env_var('GA4_DERIVED_SESSION_PROPERTIES', false) else false,
materialized = 'incremental',
incremental_strategy = 'insert_overwrite',
tags = ["incremental"],
Expand Down
2 changes: 1 addition & 1 deletion models/staging/stg_ga4__derived_user_properties.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ config(
enabled = true if var('derived_user_properties', false) else false,
enabled = true if var('derived_user_properties', false) or env_var('GA4_DERIVED_USER_PROPERTIES', false) else false,
materialized = "table"
) }}

Expand Down
2 changes: 1 addition & 1 deletion models/staging/stg_ga4__page_conversions.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ config(
enabled= var('conversion_events', false) != false
enabled= var('conversion_events', false) != false or env_var('GA4_CONVERSION_EVENTS', false) != false
) }}

select
Expand Down
2 changes: 1 addition & 1 deletion models/staging/stg_ga4__session_conversions_daily.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

{{
config(
enabled= var('conversion_events', false) != false,
enabled= var('conversion_events', false) != false or env_var('GA4_CONVERSION_EVENTS', false) != false,
materialized = 'incremental',
incremental_strategy = 'insert_overwrite',
tags = ["incremental"],
Expand Down
2 changes: 1 addition & 1 deletion models/staging/stg_ga4__user_properties.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ config(
enabled = true if var('user_properties', false) else false,
enabled = true if var('user_properties', false) or env_var('GA4_DERIVED_USER_PROPERTIES', false) else false,
materialized = "table"
) }}

Expand Down

0 comments on commit 48f2a14

Please sign in to comment.