Telemetry/LongitudinalExamples: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Kicking off the examples)
 
(adding doc links for array and map functions)
Line 10: Line 10:
  WHERE os = 'Linux'
  WHERE os = 'Linux'


=== Arrays ===
Other properties are arrays, which contain one entry for each submission from that client (newest first):
Other properties are arrays, which contain one entry for each submission from that client (newest first):
  SELECT element_at(reason, 1) AS last_reason
  SELECT element_at(reason, 1) AS last_reason
  FROM longitudinal_v20160229
  FROM longitudinal_v20160229
  WHERE os = 'Linux'
  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]

Revision as of 15:58, 7 March 2016

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: