Ottomata has submitted this change and it was merged.

Change subject: Correct webrequest refinement bug about spiders not labelled 
correctly
......................................................................


Correct webrequest refinement bug about spiders not labelled correctly

Change-Id: I01bfc09f6a08efbaa805151c99b8b6d896bf19a0
---
M oozie/webrequest/refine/refine_webrequest.hql
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/oozie/webrequest/refine/refine_webrequest.hql 
b/oozie/webrequest/refine/refine_webrequest.hql
index bb18b89..ebc252d 100644
--- a/oozie/webrequest/refine/refine_webrequest.hql
+++ b/oozie/webrequest/refine/refine_webrequest.hql
@@ -92,7 +92,7 @@
         CAST(unix_timestamp(dt, "yyyy-MM-dd'T'HH:mm:ss") * 1.0 as timestamp) 
as ts,
         get_access_method(uri_host, user_agent) as access_method,
         CASE
-            WHEN ((ua_parser(user_agent)['device'] = 'Spider') OR 
(is_crawler(user_agent))) THEN 'spider'
+            WHEN ((ua_parser(user_agent)['device_family'] = 'Spider') OR 
(is_crawler(user_agent))) THEN 'spider'
             ELSE 'user'
         END as agent_type,
         (str_to_map(x_analytics, '\;', '=')['zero'] IS NOT NULL) as is_zero
@@ -101,4 +101,4 @@
     WHERE
         webrequest_source='${webrequest_source}' AND
         year=${year} AND month=${month} AND day=${day} AND hour=${hour}
-;
\ No newline at end of file
+;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I01bfc09f6a08efbaa805151c99b8b6d896bf19a0
Gerrit-PatchSet: 2
Gerrit-Project: analytics/refinery
Gerrit-Branch: master
Gerrit-Owner: Joal <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to