These diagrams are for the Vision for metadata flow proposal.
You can view them in the mermaid live editor:
for x in $(gsed -n -E -e 's/.*(class|object|trait) ([[:alnum:]]*).*/\2/p' nacho-wire/src/main/scala/com/simple/nacho/wire/Json.scala); do | |
find nacho-service -name "*.scala" | \ | |
xargs sed -i '' '/^import/! s/\([^.[:alnum:]]\)\('$x'[[:punct:][:space:]]\)/\1wire.\2/g'; | |
done |
WITH | |
-- Distinct document_ids and their minimum submission_timestamp today | |
-- not including document_ids that only occur on or after @end_time | |
distinct_document_ids AS ( | |
SELECT | |
document_id, | |
MIN(submission_timestamp) AS submission_timestamp | |
FROM | |
`moz-fx-data-shared-prod.telemetry_live.main_v4` | |
WHERE |
CREATE TEMP FUNCTION | |
replace_compact_use_counters(h ANY type) AS (( | |
SELECT | |
AS STRUCT h.* REPLACE( | |
COALESCE(JSON_EXTRACT_SCALAR(h.use_counter2_appearance_nonwidget_button_document,"$.sum"),h.use_counter2_appearance_nonwidget_button_document) AS use_counter2_appearance_nonwidget_button_document, | |
COALESCE(JSON_EXTRACT_SCALAR(h.use_counter2_appearance_nonwidget_button_page,"$.sum"),h.use_counter2_appearance_nonwidget_button_page) AS use_counter2_appearance_nonwidget_button_page, | |
COALESCE(JSON_EXTRACT_SCALAR(h.use_counter2_appearance_nonwidget_checkbox_document,"$.sum"),h.use_counter2_appearance_nonwidget_checkbox_document) AS use_counter2_appearance_nonwidget_checkbox_document, | |
COALESCE(JSON_EXTRACT_SCALAR(h.use_counter2_appearance_nonwidget_checkbox_page,"$.sum"),h.use_counter2_appearance_nonwidget_checkbox_page) AS use_counter2_appearance_nonwidget_checkbox_page, | |
COALESCE(JSON_EXTRACT_SCALAR(h.use_counter2_appearance_nonwidget_innerspinbutton_document,"$.sum"),h.use_counter2_appearance_nonwidget_inn |
/* Example of a custom class with automatically generated Coder */ | |
@DefaultSchema(AutoValueSchema.class) | |
@AutoValue | |
abstract static class MyMessage { | |
public static MyMessage of(byte[] payload, Map<String, String> attributes) { | |
return new AutoValue_MyMessage(paylod, attributes); | |
} | |
public abstract byte[] getPayload(); | |
public abstract Map<String, String> getAttributes(); | |
} |
WITH base AS ( | |
SELECT | |
*, | |
ARRAY( | |
SELECT AS STRUCT | |
mozfun.map.get_key(mozfun.hist.extract(histogram).values, 0) AS histogram | |
FROM | |
UNNEST( | |
[ | |
payload.histograms.devtools_aboutdebugging_opened_count, |
WITH base AS ( | |
SELECT | |
*, | |
ARRAY( | |
SELECT AS STRUCT | |
mozfun.map.get_key(mozfun.hist.extract(histogram).values, 0) AS histogram | |
FROM | |
UNNEST( | |
[ | |
payload.histograms.devtools_aboutdebugging_opened_count, |
These diagrams are for the Vision for metadata flow proposal.
You can view them in the mermaid live editor:
This gist contains some prototype queries for iOS ETL implementing a minimal prototype of the baseline+metrics ETL proposed in the Mobile ETL (Short-Term) doc: https://docs.google.com/document/d/1aayc2G0qFJP7EOSvELgUsYklpyixeZChVMYtHlbCpw8/edit?ts=6054bd7e
The table has been created as mozdata.analysis.klukas_ios_cls_joined
and contains data for 2021 up to 2021-03-18.
We make a comparison to existing methodology in: https://sql.telemetry.mozilla.org/queries/78820/source