Telemetry/LongitudinalExamples

From MozillaWiki
< Telemetry
Revision as of 16:12, 7 March 2016 by One (talk | contribs) (added some blocklist examples)
Jump to navigation Jump to search

Note: There is good background in the example notebook for the longitudinal data set.

Get an overview of the longitudinal data table:

describe longitudinal_v20160229

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:

Maps

Links:

Examples

  • Blocklist URLs (extensions.blocklist.url):
SELECT bl, COUNT(bl)
FROM
  (SELECT client_id,
          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 client_id,
          element_at(settings, 1).blocklist_enabled AS bl
   FROM longitudinal_v20160229)
GROUP BY bl