Skip to content

Commit 2ba973c

Browse files
committed
feat: add comments to the views and remove timezone converversion
1 parent aa5515c commit 2ba973c

File tree

2 files changed

+9
-2
lines changed
  • sql/moz-fx-data-shared-prod
    • app_store/firefox_app_store_territory_source_type_report
    • firefox_ios_derived/app_store_funnel_v1

2 files changed

+9
-2
lines changed

sql/moz-fx-data-shared-prod/app_store/firefox_app_store_territory_source_type_report/view.sql

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ SELECT
55
-- https://developer.apple.com/help/app-store-connect/view-sales-and-trends/download-and-view-reports
66
-- "Time zone: Reports are based on Pacific Time (PT). A day includes transactions that happened from 12:00 a.m. to 11:59 p.m. PT."
77
-- Date conversion in the query is required to unify the dates to UTC timezone which is what we use.
8-
* REPLACE (TIMESTAMP(DATETIME(`date`, "America/Los_Angeles")) AS `date`),
9-
`date` AS date_pst,
8+
-- However, the `date` timestamp field appear to always show midnight meaning if we do timezone conversion
9+
-- we will end up moving all results 1 day back if we attempt conversion to UTC.
10+
-- This is why we are not doing timezone converstions here.
11+
*,
1012
FROM
1113
`moz-fx-data-shared-prod.app_store_syndicate.app_store_territory_source_type_report`

sql/moz-fx-data-shared-prod/firefox_ios_derived/app_store_funnel_v1/query.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
-- https://developer.apple.com/help/app-store-connect/view-sales-and-trends/download-and-view-reports
2+
-- "Time zone: Reports are based on Pacific Time (PT). A day includes transactions that happened from 12:00 a.m. to 11:59 p.m. PT.
3+
-- However, the `date` timestamp field appear to always show midnight meaning if we do timezone conversion
4+
-- we will end up moving all results 1 day back if we attempt conversion to UTC.
5+
-- This is why we are not doing timezone converstions here.
16
WITH historical_store_data AS (
27
WITH impression_data AS (
38
SELECT

0 commit comments

Comments
 (0)