[MediaWiki-commits] [Gerrit] don't overwrite if exists - change (analytics/zero-sms)
Yurik has submitted this change and it was merged. Change subject: don't overwrite if exists .. don't overwrite if exists Change-Id: I0edbc94c61395f28b6c72a19f47656e654cfc773 --- M scripts/zero-counts.hql 1 file changed, 6 insertions(+), 10 deletions(-) Approvals: Yurik: Verified; Looks good to me, approved diff --git a/scripts/zero-counts.hql b/scripts/zero-counts.hql index 4c1b735..67a7fb6 100644 --- a/scripts/zero-counts.hql +++ b/scripts/zero-counts.hql @@ -5,24 +5,20 @@ -- Extracts zero stats from webrequests into a separate table -- -- Usage: --- hive -f zero-counts.hql \ --- -d year=2014 \ --- -d month=9 \ --- -d day=15 \ --- -d hour=20 +-- hive -f zero-counts.hql -d year=2014 -d month=9 -d day=15 -- +-- Range usage: +-- cat inp.txt | xargs -I % hive -f zero-counts.hql -d year=2014 -d month=10 -d day=% +-- or +-- for i in {1..5}; do hive -f zero-counts.hql -d year=2014 -d month=10 -d day=$i; done -- set hivevar:year=2014; -- set hivevar:month=10; -- set hivevar:day=21; --- set hivevar:hour=1; --- printf('%d-%02d-%02d', ${year}, ${month}, ${day}) date, --- ; --- AND hour=2 INSERT OVERWRITE TABLE yurik.zero_webstats -PARTITION(date) +PARTITION(date) IF NOT EXISTS SELECT xcs, via, ipset, https, lang, subdomain, site, COUNT(*) count, date FROM ( -- To view, visit https://gerrit.wikimedia.org/r/168121 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0edbc94c61395f28b6c72a19f47656e654cfc773 Gerrit-PatchSet: 1 Gerrit-Project: analytics/zero-sms Gerrit-Branch: master Gerrit-Owner: Yurik yu...@wikimedia.org Gerrit-Reviewer: Yurik yu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] don't overwrite if exists - change (analytics/zero-sms)
Yurik has uploaded a new change for review. https://gerrit.wikimedia.org/r/168121 Change subject: don't overwrite if exists .. don't overwrite if exists Change-Id: I0edbc94c61395f28b6c72a19f47656e654cfc773 --- M scripts/zero-counts.hql 1 file changed, 6 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/zero-sms refs/changes/21/168121/1 diff --git a/scripts/zero-counts.hql b/scripts/zero-counts.hql index 4c1b735..67a7fb6 100644 --- a/scripts/zero-counts.hql +++ b/scripts/zero-counts.hql @@ -5,24 +5,20 @@ -- Extracts zero stats from webrequests into a separate table -- -- Usage: --- hive -f zero-counts.hql \ --- -d year=2014 \ --- -d month=9 \ --- -d day=15 \ --- -d hour=20 +-- hive -f zero-counts.hql -d year=2014 -d month=9 -d day=15 -- +-- Range usage: +-- cat inp.txt | xargs -I % hive -f zero-counts.hql -d year=2014 -d month=10 -d day=% +-- or +-- for i in {1..5}; do hive -f zero-counts.hql -d year=2014 -d month=10 -d day=$i; done -- set hivevar:year=2014; -- set hivevar:month=10; -- set hivevar:day=21; --- set hivevar:hour=1; --- printf('%d-%02d-%02d', ${year}, ${month}, ${day}) date, --- ; --- AND hour=2 INSERT OVERWRITE TABLE yurik.zero_webstats -PARTITION(date) +PARTITION(date) IF NOT EXISTS SELECT xcs, via, ipset, https, lang, subdomain, site, COUNT(*) count, date FROM ( -- To view, visit https://gerrit.wikimedia.org/r/168121 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0edbc94c61395f28b6c72a19f47656e654cfc773 Gerrit-PatchSet: 1 Gerrit-Project: analytics/zero-sms Gerrit-Branch: master Gerrit-Owner: Yurik yu...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits