Bearloga has uploaded a new change for review. https://gerrit.wikimedia.org/r/305736
Change subject: Combine MobileWikiAppSearch revisions ...................................................................... Combine MobileWikiAppSearch revisions Bug: T143447 Change-Id: I9ef3fcc2645eae8a00a5ae32c0f9b8465386c4dd --- M search/app.R 1 file changed, 15 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/golden refs/changes/36/305736/1 diff --git a/search/app.R b/search/app.R index 9b6a776..c82f0bf 100644 --- a/search/app.R +++ b/search/app.R @@ -3,18 +3,29 @@ # Retrieves data for the mobile web stuff we care about, drops it in the aggregate-datasets directory. Should be run on stat1002, /not/ on the datavis machine. -main <- function(date = NULL, table = "MobileWikiAppSearch_10641988"){ +main <- function(date = NULL){ # Retrieve data using the query builder in ./common.R - data <- wmf::build_query(fields = "SELECT SUBSTRING(timestamp, 1, 8) AS date, + data <- rbind(wmf::build_query(fields = "SELECT SUBSTRING(timestamp, 1, 8) AS date, CASE event_action WHEN 'click' THEN 'clickthroughs' WHEN 'start' THEN 'search sessions' WHEN 'results' THEN 'Result pages opened' END AS action, event_timeToDisplayResults AS load_time, userAgent", date = date, - table = table, - conditionals = "event_action IN ('click','start','results')") + table = "MobileWikiAppSearch_10641988", + conditionals = "event_action IN ('click','start','results')"), + wmf::build_query(fields = "SELECT SUBSTRING(timestamp, 1, 8) AS date, + CASE event_action WHEN 'click' THEN 'clickthroughs' + WHEN 'start' THEN 'search sessions' + WHEN 'results' THEN 'Result pages opened' END AS action, + event_timeToDisplayResults AS load_time, + userAgent", + date = date, + table = "MobileWikiAppSearch_15729321", + conditionals = "event_action IN ('click','start','results')")) + # See https://phabricator.wikimedia.org/T143447 for more info on why we're combining + # events from these two different schema revisions. data <- data.table::as.data.table(data) data$date <- lubridate::ymd(data$date) data$platform[grepl(x = data$userAgent, pattern = "Android", fixed = TRUE)] <- "Android" -- To view, visit https://gerrit.wikimedia.org/r/305736 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9ef3fcc2645eae8a00a5ae32c0f9b8465386c4dd Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/golden Gerrit-Branch: master Gerrit-Owner: Bearloga <mpo...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits