Skip to content

Instantly share code, notes, and snippets.

Avatar

Tim D. Smith tdsmith

View GitHub Profile
View gist:97038b14bb36851086a28b01ecd52a87
CREATE TEMPORARY TABLE enrollments AS (
WITH analysis_windows AS (
(SELECT 0 AS analysis_window_start, 6 AS analysis_window_end)
),
raw_enrollments AS (
SELECT
e.client_id,
`mozfun.map.get_key`(e.event_map_values, 'branch')
AS branch,
View bug-1671620-message-homepage-remediation-search-value-props-exper-release-82-83.toml
[experiment]
enrollment_query = """
SELECT
client_id,
mozfun.map.get_key(experiments, "{{experiment.normandy_slug}}").branch AS branch,
MIN(DATE(submission_timestamp)) AS enrollment_date,
COUNT(*) AS num_enrollments
FROM `moz-fx-data-shared-prod`.messaging_system.cfr
WHERE
message_id LIKE "{{experiment.normandy_slug}}:%"
View gist:d658e87085f6bab21d6178ee704baaa1
Validate bug-1671620-message-homepage-remediation-search-value-props-exper-release-82-83.toml
Error evaluating SQL:
1
2 WITH analysis_windows AS (
3 (SELECT 0 AS analysis_window_start, 20 AS analysis_window_end)
4 ),
5 raw_enrollments AS ( SELECT
6 client_id,
7 mozfun.map.get_key(experiments, "bug-1671620-message-homepage-remediation-search-value-props-exper-release-82-83").branch AS branch,
8 MIN(DATE(submission_timestamp)) AS enrollment_date,
View gist:d101aa2710c4295d9f7747fb21a10fa5
additional_properties
client_info
client_info.android_sdk_version
client_info.app_build
client_info.app_channel
client_info.app_display_version
client_info.architecture
client_info.client_id
client_info.device_manufacturer
client_info.device_model
View build.py
import datetime as dt
from functools import partial
import json
from pathlib import Path
import logging
import attr
from google.cloud import bigquery as bq
from google.cloud import storage as storage
from google.api_core import exceptions as bq_ex
View gist:62cb98870645963b78e0af0475634288
diff --git a/a b/b
index 0e44fc7..588bcde 100644
--- a/a
+++ b/b
@@ -2,6 +2,7 @@ DECLARE start_date DATE DEFAULT '2020-09-01';
WITH video_usage_per_client as (
SELECT
+ normalized_os,
client_id,
View gist:396ac847e64a1629e5de15afe038b18c
WITH events AS (
SELECT
metadata.isp.name = 'Comcast Cable' AS from_comcast,
`moz-fx-data-shared-prod`.udf.deanonymize_event(e).*
FROM
`moz-fx-data-shared-prod`.telemetry.event
CROSS JOIN UNNEST(payload.events.dynamic) e
WHERE DATE(submission_timestamp) BETWEEN '2020-08-11' AND '2020-08-19'
)
View gist:d01170c8617646e71f48aadb6f044541
1574121600000
1595721600000
null
1576454400000
1568246400000
1509494400000
1575331200000
1554076800000
1587340800000
1581984000000
View gist:2e4e12723e0ab3e3d8b5ec3527c4665f
{
"experiment_url": "https://experimenter.services.mozilla.com/experiments/search-topsites/",
"type": "addon",
"name": "Activity Stream Search TopSites",
"slug": "search-topsites",
"public_name": "TopSites for Search",
"public_description": "We believe we can deliver an enhanced product experience by exposing these Topsites in a new context, allowing users to navigate even more quickly and easily than they can today.",
"status": "Complete",
"client_matching": "Prefs: Exclude users with the following prefs:\r\n\r\nbrowser.newtabpage.activity-stream.feeds.topsites = false\r\nbrowser.privatebrowsing.autostart = true\r\n\r\nExperiments:\r\n\r\nAny additional filters:",
"locales": [],
View fields.sh
bq show --schema $1 | \
jq -r '.[] | recurse(.fields[]? + {parent: ((.parent? // []) + [.name])}) | .parent + [.name] | join(".")'
You can’t perform that action at this time.