Skip to content

Commit

Permalink
Fix field extractions
Browse files Browse the repository at this point in the history
  • Loading branch information
agnessnowplow committed Oct 9, 2023
1 parent 0f8a784 commit 5b27d9a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion macros/field_extractions/get_cmp_visible_fields.sql
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ You may obtain a copy of the Snowplow Community License Version 1.0 at https://d

{% macro spark__get_cmp_visible_fields() %}
{% if var('snowplow__enable_consent', false) %}
, unstruct_event_com_snowplowanalytics_snowplow_cmp_visible_1[0].elapsed_time::float as cmp__elapsed_time
, unstruct_event_com_snowplowanalytics_snowplow_cmp_visible_1.elapsed_time::float as cmp__elapsed_time

{% else %}
, cast(null as {{ type_float() }}) as cmp__elapsed_time
Expand Down
14 changes: 7 additions & 7 deletions macros/field_extractions/get_consent_fields.sql
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ You may obtain a copy of the Snowplow Community License Version 1.0 at https://d

{% macro spark__get_consent_fields() %}
{% if var('snowplow__enable_consent', false) %}
, unstruct_event_com_snowplowanalytics_snowplow_consent_preferences_1[0].event_type::STRING as consent__event_type
, unstruct_event_com_snowplowanalytics_snowplow_consent_preferences_1[0].basis_for_processing::STRING as consent__basis_for_processing
, unstruct_event_com_snowplowanalytics_snowplow_consent_preferences_1[0].consent_url::STRING as consent__consent_url
, unstruct_event_com_snowplowanalytics_snowplow_consent_preferences_1[0].consent_version::STRING as consent__consent_version
, unstruct_event_com_snowplowanalytics_snowplow_consent_preferences_1[0].consent_scopes::ARRAY<STRING> as consent__consent_scopes
, unstruct_event_com_snowplowanalytics_snowplow_consent_preferences_1[0].domains_applied::ARRAY<STRING> as consent__domains_applied
, unstruct_event_com_snowplowanalytics_snowplow_consent_preferences_1[0].gdpr_applies::boolean as consent__gdpr_applies
, unstruct_event_com_snowplowanalytics_snowplow_consent_preferences_1.event_type::STRING as consent__event_type
, unstruct_event_com_snowplowanalytics_snowplow_consent_preferences_1.basis_for_processing::STRING as consent__basis_for_processing
, unstruct_event_com_snowplowanalytics_snowplow_consent_preferences_1.consent_url::STRING as consent__consent_url
, unstruct_event_com_snowplowanalytics_snowplow_consent_preferences_1.consent_version::STRING as consent__consent_version
, unstruct_event_com_snowplowanalytics_snowplow_consent_preferences_1.consent_scopes::ARRAY<STRING> as consent__consent_scopes
, unstruct_event_com_snowplowanalytics_snowplow_consent_preferences_1.domains_applied::ARRAY<STRING> as consent__domains_applied
, unstruct_event_com_snowplowanalytics_snowplow_consent_preferences_1.gdpr_applies::boolean as consent__gdpr_applies
{% else %}
, cast(null as {{ type_string() }}) as consent__event_type
, cast(null as {{ type_string() }}) as consent__basis_for_processing
Expand Down
28 changes: 14 additions & 14 deletions macros/field_extractions/get_cwv_fields.sql
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ You may obtain a copy of the Snowplow Community License Version 1.0 at https://d

{% macro spark__get_cwv_fields() %}
{% if var('snowplow__enable_cwv', false) %}
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1[0].lcp::decimal(14,4) as cwv__lcp,
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1[0].fcp::decimal(14,4) as cwv__fcp,
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1[0].fid::decimal(14,4) as cwv__fid,
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1[0].cls::decimal(14,4) as cwv__cls,
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1[0].inp::decimal(14,4) as cwv__inp,
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1[0].ttfb::decimal(14,4) as cwv__ttfb,
e.unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1[0].navigationType::varchar(128) as cwv__navigation_type
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1.lcp::decimal(14,4) as cwv__lcp
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1.fcp::decimal(14,4) as cwv__fcp
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1.fid::decimal(14,4) as cwv__fid
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1.cls::decimal(14,4) as cwv__cls
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1.inp::decimal(14,4) as cwv__inp
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1.ttfb::decimal(14,4) as cwv__ttfb
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1.navigationType::varchar(128) as cwv__navigation_type
{% else %}
, cast(null as decimal(14,4)) as cwv__lcp,
, cast(null as decimal(14,4)) as cwv__fcp,
Expand All @@ -74,13 +74,13 @@ You may obtain a copy of the Snowplow Community License Version 1.0 at https://d

{% macro snowflake__get_cwv_fields() %}
{% if var('snowplow__enable_cwv', false) %}
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1:lcp::decimal(14,4) as cwv__lcp,
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1:fcp::decimal(14,4) as cwv__fcp,
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1:fid::decimal(14,4) as cwv__fid,
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1:cls::decimal(14,4) as cwv__cls,
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1:inp::decimal(14,4) as cwv__inp,
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1:ttfb::decimal(14,4) as cwv__ttfb,
e.unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1:navigationType::varchar as cwv__navigation_type
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1:lcp::decimal(14,4) as cwv__lcp
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1:fcp::decimal(14,4) as cwv__fcp
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1:fid::decimal(14,4) as cwv__fid
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1:cls::decimal(14,4) as cwv__cls
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1:inp::decimal(14,4) as cwv__inp
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1:ttfb::decimal(14,4) as cwv__ttfb
, unstruct_event_com_snowplowanalytics_snowplow_unified_web_vitals_1:navigationType::varchar as cwv__navigation_type
{% else %}
, cast(null as decimal(14,4)) as cwv__lcp,
, cast(null as decimal(14,4)) as cwv__fcp,
Expand Down

0 comments on commit 5b27d9a

Please sign in to comment.