AMO:Developers/Hive
From MozillaWiki
AMO HIVE
ssh hm-admin03.scl2.mozilla.com hive [query here]
Or to run a query without using interactive mode:
hive -e "[query here]"
To see the available sources
SHOW PARTITIONS research_logs;
Sample queries
SELECT COUNT(1) FROM research_logs WHERE ip_address != 'NULL' AND ds = '2010-12-14' AND domain='services.addons.mozilla.org' AND request_url LIKE '%discovery%';
SELECT empty_string_1, COUNT(1) as num FROM research_logs WHERE ip_address != 'NULL' AND ds = '2010-12-14' AND (domain='addons.mozilla.org' OR domain='static.addons.mozilla.org') AND request_url LIKE '%/images/addon_icon/1865/%' GROUP BY empty_string_1 ORDER BY num DESC;
SELECT COUNT(1) FROM research_logs WHERE ip_address != 'NULL' AND ds = '2010-12-14' AND domain='services.addons.mozilla.org' AND request_url LIKE '%api/%/list/featured/%';
Metadata Pings
Daily metdata pings are further broken out into the addons_pings table and parsed into columns. In order to only count daily pings instead of post-install pings, you should only consider requests where the GUID contains the default theme (%7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D)
SELECT guid, appos, appversion, tmain, tfirstpaint, tsessionrestored FROM addons_pings WHERE ds = '2011-04-10' AND src = 'firefox';