CloudServices/Sync/ReDash

From MozillaWiki
< CloudServices‎ | Sync
Revision as of 20:10, 14 October 2016 by Adavis (talk | contribs) (added details to description)
Jump to navigation Jump to search

Table Described

The Sync team's telemetry goes through our data pipeline and lands in Presto to be explored in Re:Dash. Below is a description of the data available in the sync_summary table.

Field Names Data Type Description
app_build_id varchar Firefox build ID (e.g. 20160801085519)
app_display_version varchar Firefox version (e.g. 50.0a2)
app_name varchar Platform?
app_version varchar What's the difference with app_display_version?
uid varchar Hashed Sync/FxA ID
deviceid varchar Browser profile id? Not currently captured.
when bigint Linux time stamp of when sync occurred. Make sure to put in "quotes" since when is a reserved SQL word.
took bigint Time it took to Sync?
failurereason row(name varchar, value varchar) Sync failure reason
status row(sync varchar, service varchar) ??
why varchar Always null because XYZ and is meant for ABC
engines array(row(name varchar, took bigint, status varchar, failureReason row(name varchar, value varchar), incoming row(applied bigint, failed bigint, newFailed bigint, reconciled bigint), outgoing array(row(sent bigint, failed bigint)))) ??
submission_date_s3 varchar ??

Query Examples

The example below demonstrate how to select data in JSON object.

WITH errors AS (
  SELECT 
  	failurereason.name AS name, 
  	failurereason.value AS value 
  FROM sync_summary 
  WHERE failurereason IS NOT NULL
)

SELECT 
	name, 
	COUNT(value) 
FROM errors 
GROUP BY name