Skip to content

Commit 0877f1a

Browse files
committed
fixes
1 parent da4c1b5 commit 0877f1a

5 files changed

Lines changed: 12 additions & 12 deletions

File tree

models/analytics/google_analytics_events_wid.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
{%- set tmp_res = ta_firebase.get_filtered_columns_for_table("google_analytics_installs_raw", columnNamesInstallDimensions, miniColumnsToIgnoreInGroupBy) -%}
3333
{%- set columnsForInstallDimensions = tmp_res[0] -%}
3434
{%- set installDimensionsUnnestedCount = tmp_res[1] -%}
35-
-- {# do these separaetely, so we don't end up with install_installed_dates #}
35+
{# do these separaetely, so we don't end up with install_installed_dates #}
3636
{%- set tmp_res = ta_firebase.get_filtered_columns_for_table("google_analytics_installs_raw", ["installed_dates"], miniColumnsToIgnoreInGroupBy) -%}
3737
{%- set columnsForInstalledDatesDimension = tmp_res[0] -%}
3838
{%- set installedDatesDimensionsUnnestedCount = tmp_res[1] -%}
@@ -49,8 +49,8 @@
4949
{%- set miniColumnsToAlsoNil = [] -%}
5050
WITH data as (
5151
SELECT DATE(events.event_ts) as event_date
52-
, project_id
53-
, dataset_id
52+
, events.project_id
53+
, events.dataset_id
5454
, {{ ta_firebase.unpack_columns_into_minicolumns(columnsForEventDimensions, miniColumnsToIgnoreInGroupBy, miniColumnsToAlsoNil ,"events.", "event_") }}
5555
, DATE(installs.install_ts) as install_date
5656
, events.install_age as install_age

models/analytics/google_analytics_events_wid_forced_nulls.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
{%- set tmp_res = ta_firebase.get_filtered_columns_for_table("google_analytics_installs_raw", columnNamesInstallDimensions, miniColumnsToIgnoreInGroupBy) -%}
3333
{%- set columnsForInstallDimensions = tmp_res[0] -%}
3434
{%- set installDimensionsUnnestedCount = tmp_res[1] -%}
35-
-- {# do these separaetely, so we don't end up with install_installed_dates #}
35+
{# do these separaetely, so we don't end up with install_installed_dates #}
3636
{%- set tmp_res = ta_firebase.get_filtered_columns_for_table("google_analytics_installs_raw", ["installed_dates"], miniColumnsToIgnoreInGroupBy) -%}
3737
{%- set columnsForInstalledDatesDimension = tmp_res[0] -%}
3838
{%- set installedDatesDimensionsUnnestedCount = tmp_res[1] -%}
@@ -50,8 +50,8 @@
5050
{%- set miniColumnsToAlsoNil = ta_firebase.get_mini_columns_to_also_force_null_when_rolling_up() -%}
5151
WITH data as (
5252
SELECT DATE(events.event_ts) as event_date
53-
, project_id
54-
, dataset_id
53+
, events.project_id
54+
, events.dataset_id
5555
, {{ ta_firebase.unpack_columns_into_minicolumns(columnsForEventDimensions, miniColumnsToIgnoreInGroupBy, miniColumnsToAlsoNil ,"events.", "event_") }}
5656
, DATE(installs.install_ts) as install_date
5757
, events.install_age as install_age

models/app_health/app_health.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
{%- endfor -%}
6262
{%- endfor -%}
6363

64-
{%- set commonDimensions = ["event_date","platform","app_id","reverse_app_id",
64+
{%- set commonDimensions = ["event_date","platform","bundle_id","reverse_bundle_id",
6565
"app_version.join_value","platform_version.join_value",
6666
"device_hardware.type","device_hardware.manufacturer","device_hardware.os_model"] -%}
6767

@@ -134,8 +134,8 @@ WITH analytics AS (
134134
)
135135
SELECT event_date
136136
, platform
137-
, app_id
138-
, reverse_app_id
137+
, bundle_id
138+
, reverse_bundle_id
139139
, {{ ta_firebase.get_version_record_from_normalized('app_version_join_value') }} AS app_version
140140
, {{ ta_firebase.get_version_record_from_normalized('platform_version_join_value') }} AS platform_version
141141
, STRUCT<type STRING, manufacturer STRING, os_model STRING>(

models/crashlytics/crashlytics_events.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
) }}
1111

1212

13-
{%- set columnNamesEventDimensions = ["bunlde_id", "reverse_bundle_id", "issue", "platform", "error_type", "process_state"
13+
{%- set columnNamesEventDimensions = ["bundle_id", "reverse_bundle_id", "issue", "platform", "error_type", "process_state"
1414
,"orientation", "app_version", "platform_version", "jailbroken_state"
1515
,"device_hardware", "custom_keys"
1616
] -%}

models/crashlytics/crashlytics_events_raw.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@
116116
, installation_uuid as crashlytics_user_pseudo_id
117117
, (SELECT value FROM UNNEST(custom_keys) WHERE key = 'fb_user_pseudo_id') as firebase_analytics_user_pseudo_id
118118
, COALESCE(user.id, (SELECT value FROM UNNEST(custom_keys) WHERE key = 'app_user_id')) as user_id
119-
, bundle_identifier as app_id
120-
, ARRAY_TO_STRING(ARRAY_REVERSE(SPLIT(bundle_identifier, '.')), '.') as reverse_app_id
119+
, bundle_identifier as bundle_id
120+
, ARRAY_TO_STRING(ARRAY_REVERSE(SPLIT(bundle_identifier, '.')), '.') as reverse_bundle_id
121121
, event_id
122122
-- the platform we get in operating_system.type is not populated for Android, only for iOS. So rely on _TABLE_SUFFIX instead
123123
, CASE WHEN _TABLE_SUFFIX LIKE '%ANDROID%' THEN'ANDROID'

0 commit comments

Comments
 (0)