Telemetry/LongitudinalExamples: Difference between revisions

(Simplifying examples)
(Deprecate wiki based d10n)
 
(21 intermediate revisions by 5 users not shown)
Line 1: Line 1:
Note: There is good background in the [https://gist.github.com/vitillo/627eab7e2b3f814725d2 example notebook] for the longitudinal data set.
This document is now hosted here:
https://github.com/mozilla/telemetry-batch-view/blob/master/docs/longitudinal_examples.md


Get an overview of the longitudinal data table:
Wiki pages linking to this dead page:
describe longitudinal_v20160229
https://wiki.mozilla.org/api.php?action=query&list=backlinks&bltitle=Telemetry/LongitudinalExamples
 
That table has a row for each client, with columns for the different parts of the ping.
Some properties are directly available to query on:
SELECT count(*) AS count
FROM longitudinal_v20160229
WHERE os = 'Linux'
 
=== Arrays ===
Other properties are arrays, which contain one entry for each submission from that client (newest first):
SELECT element_at(reason, 1) AS last_reason
FROM longitudinal_v20160229
WHERE os = 'Linux'
 
Links:
* [https://prestodb.io/docs/current/functions/array.html Documentation on array functions]
 
=== Maps ===
 
Links:
* [https://prestodb.io/docs/current/functions/map.html Documentation on map functions]
 
=== Examples ===
* Blocklist URLs (extensions.blocklist.url):
SELECT bl, COUNT(bl)
FROM
  (SELECT element_at(settings, 1).user_prefs['extensions.blocklist.url'] AS bl
    FROM longitudinal_v20160229)
GROUP BY bl
 
* Blocklist enabled/disabled (extensions.blocklist.enabled) count:
SELECT bl, COUNT(bl)
FROM
  (SELECT element_at(settings, 1).blocklist_enabled AS bl
    FROM longitudinal_v20160229)
GROUP BY bl

Latest revision as of 22:11, 7 November 2016