Yurik has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327373 )

Change subject: Count number of pages with tabular data on Commons
......................................................................


Count number of pages with tabular data on Commons

Change-Id: I4ac2ade9a951aa6deb0c898d6297935ff31b21ab
---
M interactive/config.yaml
A interactive/tabtypes.txt
A interactive/tabular-repo.sql
3 files changed, 27 insertions(+), 2 deletions(-)

Approvals:
  Yurik: Verified; Looks good to me, approved



diff --git a/interactive/config.yaml b/interactive/config.yaml
index 990f388..4949c91 100644
--- a/interactive/config.yaml
+++ b/interactive/config.yaml
@@ -9,12 +9,15 @@
         port: 3307
         creds_file: ~/.my.cnf.research
         db: log
+    commons:
+        host: "analytics-store.eqiad.wmnet"
+        port: 3306
+        creds_file: /a/.my.cnf.research
+        db: commonswiki
 
 graphite:
     host: graphite.eqiad.wmnet
     port: 2003
-    #lookups:
-    #    wiki: sitematrix.yaml
 
 defaults:
     db: el
@@ -40,3 +43,15 @@
             path: "{_metric}.{action}.{feature}"
             metrics:
                 "daily.kartographer.events-all": events
+
+    tabular-repo:
+        granularity: days
+        funnel: true
+        starts: 2016-12-13
+        db: commons
+        explode_by:
+            type: tabtypes.txt
+        graphite:
+            path: "{_metric}.{type}"
+            metrics:
+                "daily.structured-data.repo.pagecount": num
diff --git a/interactive/tabtypes.txt b/interactive/tabtypes.txt
new file mode 100644
index 0000000..274ba57
--- /dev/null
+++ b/interactive/tabtypes.txt
@@ -0,0 +1,2 @@
+map
+tab
diff --git a/interactive/tabular-repo.sql b/interactive/tabular-repo.sql
new file mode 100644
index 0000000..6b62e5b
--- /dev/null
+++ b/interactive/tabular-repo.sql
@@ -0,0 +1,8 @@
+SELECT
+        DATE(NOW()) AS day,
+        COUNT(*) AS num
+    FROM page
+    WHERE
+        page_namespace = 486
+        AND page_title LIKE '%.{type}'
+;

-- 
To view, visit https://gerrit.wikimedia.org/r/327373
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4ac2ade9a951aa6deb0c898d6297935ff31b21ab
Gerrit-PatchSet: 3
Gerrit-Project: analytics/discovery-stats
Gerrit-Branch: master
Gerrit-Owner: MaxSem <maxsem.w...@gmail.com>
Gerrit-Reviewer: Yurik <yu...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to