diff --git a/.github/workflows/run_unit_tests_on_pr.yml b/.github/workflows/run_unit_tests_on_pr.yml index fba19468..8824d50f 100644 --- a/.github/workflows/run_unit_tests_on_pr.yml +++ b/.github/workflows/run_unit_tests_on_pr.yml @@ -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: diff --git a/models/staging/stg_ga4__derived_session_properties.sql b/models/staging/stg_ga4__derived_session_properties.sql index 65fbcfd6..0b4816f7 100644 --- a/models/staging/stg_ga4__derived_session_properties.sql +++ b/models/staging/stg_ga4__derived_session_properties.sql @@ -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" ) }} diff --git a/models/staging/stg_ga4__derived_session_properties_daily.sql b/models/staging/stg_ga4__derived_session_properties_daily.sql index f997d40b..b3042d37 100644 --- a/models/staging/stg_ga4__derived_session_properties_daily.sql +++ b/models/staging/stg_ga4__derived_session_properties_daily.sql @@ -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"], diff --git a/models/staging/stg_ga4__derived_user_properties.sql b/models/staging/stg_ga4__derived_user_properties.sql index ec1fd6b6..b3bd666b 100644 --- a/models/staging/stg_ga4__derived_user_properties.sql +++ b/models/staging/stg_ga4__derived_user_properties.sql @@ -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" ) }} diff --git a/models/staging/stg_ga4__page_conversions.sql b/models/staging/stg_ga4__page_conversions.sql index ea5a7f57..538f94fd 100644 --- a/models/staging/stg_ga4__page_conversions.sql +++ b/models/staging/stg_ga4__page_conversions.sql @@ -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 diff --git a/models/staging/stg_ga4__session_conversions_daily.sql b/models/staging/stg_ga4__session_conversions_daily.sql index 983657c5..d49b0f9f 100644 --- a/models/staging/stg_ga4__session_conversions_daily.sql +++ b/models/staging/stg_ga4__session_conversions_daily.sql @@ -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"], diff --git a/models/staging/stg_ga4__user_properties.sql b/models/staging/stg_ga4__user_properties.sql index c9deaba5..ff531c8e 100644 --- a/models/staging/stg_ga4__user_properties.sql +++ b/models/staging/stg_ga4__user_properties.sql @@ -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" ) }}