Mforns has uploaded a new change for review.
https://gerrit.wikimedia.org/r/228416
Change subject: Make reports compatible with EL auto-purging
......................................................................
Make reports compatible with EL auto-purging
Also migrate reports to reportupdater.
Bug: T107506
Change-Id: I2ba0a772c8baf467fd71dbd60ae7bf0a35ed28bc
---
M dashboards/reportcard.json
M extdist/config.yaml
M extdist/downloads.sql
M extdist/extension_downloads.sql
M extdist/skin_downloads.sql
5 files changed, 23 insertions(+), 18 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-extdist-data
refs/changes/16/228416/1
diff --git a/dashboards/reportcard.json b/dashboards/reportcard.json
index 4c60753..0295fcd 100644
--- a/dashboards/reportcard.json
+++ b/dashboards/reportcard.json
@@ -6,8 +6,8 @@
{
"name": "Main",
"graph_ids": [
-
"http://datasets.wikimedia.org/limn-public-data/extdist/datafiles/extension_downloads.csv",
-
"http://datasets.wikimedia.org/limn-public-data/extdist/datafiles/skin_downloads.csv"
+
"http://datasets.wikimedia.org/limn-public-data/extdist/datafiles/extension_downloads.tsv",
+
"http://datasets.wikimedia.org/limn-public-data/extdist/datafiles/skin_downloads.tsv"
]
}
]
diff --git a/extdist/config.yaml b/extdist/config.yaml
index 72fc702..053fa83 100644
--- a/extdist/config.yaml
+++ b/extdist/config.yaml
@@ -4,30 +4,28 @@
port: 3306
creds_file: /a/.my.cnf.research
db: log
-# for convenience, define unions of different event logging schemas here:
-tables:
-intervals:
- running_average: 30
-output:
- path: /a/limn-public-data/extdist/datafiles
defaults:
db: el
+graphs: # removing this empty section makes generate.py crash
-# the key in the graph section is the name of the sql file and generated file
-graphs:
+reportupdater-output: /a/limn-public-data/extdist/datafiles
+reportupdater-reports:
extension_downloads:
- title: "Extensions (Top 10)"
- frequency: daily
+ frequency: days
+ granularity: months
timeboxed: true
starts: 2015-07-01
skin_downloads:
- title: "Skins (Top 10)"
- frequency: daily
+ frequency: days
+ granularity: months
timeboxed: true
starts: 2015-07-01
downloads:
- title: "This can not be shown in a graph"
- frequency: daily
+ frequency: days
+ granularity: months
+ timeboxed: true
+ starts: 2015-07-01
+ funnel: true # enables multiple lines for the same date
diff --git a/extdist/downloads.sql b/extdist/downloads.sql
index 8d53379..7b3642f 100644
--- a/extdist/downloads.sql
+++ b/extdist/downloads.sql
@@ -1,5 +1,5 @@
SELECT
- LEFT(timestamp, 6) AS month,
+ date('{from_timestamp}') AS month,
event_type,
event_name,
event_version,
@@ -7,6 +7,10 @@
FROM
ExtDistDownloads_12369387
+
+WHERE
+ timestamp >= '{from_timestamp}' AND
+ timestamp < '{to_timestamp}'
GROUP BY
month,
@@ -18,4 +22,5 @@
month ASC,
event_type ASC,
event_name,
- event_version;
+ event_version
+;
diff --git a/extdist/extension_downloads.sql b/extdist/extension_downloads.sql
index 27615d1..5832eb7 100644
--- a/extdist/extension_downloads.sql
+++ b/extdist/extension_downloads.sql
@@ -1,4 +1,5 @@
SELECT
+ date('{from_timestamp}') as 'Month',
sum(if(event_name='VisualEditor',1,0)) as 'VisualEditor',
sum(if(event_name='LdapAuthentication',1,0)) as
'LdapAuthentication',
sum(if(event_name='WikiEditor',1,0)) as 'WikiEditor',
diff --git a/extdist/skin_downloads.sql b/extdist/skin_downloads.sql
index f362e3b..25ba084 100644
--- a/extdist/skin_downloads.sql
+++ b/extdist/skin_downloads.sql
@@ -1,4 +1,5 @@
SELECT
+ date('{from_timestamp}') as 'Month',
sum(if(event_name='Vector',1,0)) as 'Vector',
sum(if(event_name='apex',1,0)) as 'apex',
sum(if(event_name='BlueSky',1,0)) as 'BlueSky',
--
To view, visit https://gerrit.wikimedia.org/r/228416
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ba0a772c8baf467fd71dbd60ae7bf0a35ed28bc
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-extdist-data
Gerrit-Branch: master
Gerrit-Owner: Mforns <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits