MarkTraceur has uploaded a new change for review.
https://gerrit.wikimedia.org/r/266224
Change subject: Fix cross-wiki upload script
......................................................................
Fix cross-wiki upload script
The recentchanges table only goes back 30 days, which is why we didn't
have any useful historical data. MatmaRex set me straight, and pointed
me to the change_tag table, which is less stupid than tag_summary.
Change-Id: Ic6fe5ef178094c934621b84c498e120b08918bfb
---
M multimedia/cross-wiki-uploads.sql
1 file changed, 7 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-multimedia-data
refs/changes/24/266224/1
diff --git a/multimedia/cross-wiki-uploads.sql
b/multimedia/cross-wiki-uploads.sql
index e30ce96..9fc49dd 100644
--- a/multimedia/cross-wiki-uploads.sql
+++ b/multimedia/cross-wiki-uploads.sql
@@ -1,8 +1,9 @@
select date('{from_timestamp}') as date,
count(*) as {wiki_db}
- from {wiki_db}.tag_summary
- join {wiki_db}.recentchanges on
- ts_rc_id = rc_id
- where ts_tags="cross-wiki-upload" and
- rc_timestamp >= '{from_timestamp}' and
- rc_timestamp < '{to_timestamp}';
+ from {wiki_db}.change_tag
+ join {wiki_db}.logging on
+ ct_log_id = log_id
+ where ct_tag = "cross-wiki-upload" and
+ log_type = "upload" and
+ log_timestamp >= '{from_timestamp}' and
+ log_timestamp < '{to_timestamp}';
--
To view, visit https://gerrit.wikimedia.org/r/266224
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic6fe5ef178094c934621b84c498e120b08918bfb
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-multimedia-data
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits