Ottomata has submitted this change and it was merged.
Change subject: Add user_agent_map to intermediate pageview
......................................................................
Add user_agent_map to intermediate pageview
user_agent_map field added to table creation script.
uer_agent_map field copied from refined table at aggregation time.
record version number bumped to 0.0.2
Bug: T107436
Change-Id: Icaf1fab992f69c042c02b6f54e50a5f5713582fb
---
M hive/pageview/hourly/create_pageview_hourly_table.hql
M oozie/pageview/hourly/coordinator.properties
M oozie/pageview/hourly/pageview_hourly.hql
3 files changed, 7 insertions(+), 4 deletions(-)
Approvals:
Ottomata: Verified; Looks good to me, approved
diff --git a/hive/pageview/hourly/create_pageview_hourly_table.hql
b/hive/pageview/hourly/create_pageview_hourly_table.hql
index d99c1cc..1149233 100644
--- a/hive/pageview/hourly/create_pageview_hourly_table.hql
+++ b/hive/pageview/hourly/create_pageview_hourly_table.hql
@@ -29,7 +29,8 @@
`subdivision` string COMMENT 'Subdivision of the accessing agents
(computed using maxmind GeoIP database)',
`city` string COMMENT 'City iso code of the accessing agents
(computed using maxmind GeoIP database)',
`record_version` string COMMENT 'Keeps track of changes in the table
content definition -
https://wikitech.wikimedia.org/wiki/Analytics/Data/Pageview_hourly',
- `view_count` bigint COMMENT 'number of pageviews'
+ `view_count` bigint COMMENT 'number of pageviews',
+ `user_agent_map` map<string, string> COMMENT 'User-agent map with
device_family, browser_family, browser_major, os_family, os_major, os_minor and
wmf_app_version keys and associated values'
)
PARTITIONED BY (
`year` int COMMENT 'Unpadded year of pageviews',
diff --git a/oozie/pageview/hourly/coordinator.properties
b/oozie/pageview/hourly/coordinator.properties
index 3ba149b..bb5ec23 100644
--- a/oozie/pageview/hourly/coordinator.properties
+++ b/oozie/pageview/hourly/coordinator.properties
@@ -55,7 +55,7 @@
destination_table = wmf.pageview_hourly
# Record version to keep track of changes
-record_version = 0.0.1
+record_version = 0.0.2
# Coordintator to start.
oozie.coord.application.path = ${coordinator_file}
diff --git a/oozie/pageview/hourly/pageview_hourly.hql
b/oozie/pageview/hourly/pageview_hourly.hql
index 66d8af8..198b926 100644
--- a/oozie/pageview/hourly/pageview_hourly.hql
+++ b/oozie/pageview/hourly/pageview_hourly.hql
@@ -44,7 +44,8 @@
geocoded_data['subdivision'] AS subdivision,
geocoded_data['city'] AS city,
'${record_version}' AS record_version,
- COUNT(1) AS view_count
+ COUNT(1) AS view_count,
+ user_agent_map
FROM
${source_table}
WHERE webrequest_source IN ('text', 'mobile') AND
@@ -62,5 +63,6 @@
geocoded_data['country_code'],
geocoded_data['country'],
geocoded_data['subdivision'],
- geocoded_data['city']
+ geocoded_data['city'],
+ user_agent_map
;
--
To view, visit https://gerrit.wikimedia.org/r/228010
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Icaf1fab992f69c042c02b6f54e50a5f5713582fb
Gerrit-PatchSet: 2
Gerrit-Project: analytics/refinery
Gerrit-Branch: master
Gerrit-Owner: Joal <[email protected]>
Gerrit-Reviewer: Joal <[email protected]>
Gerrit-Reviewer: Madhuvishy <[email protected]>
Gerrit-Reviewer: Mforns <[email protected]>
Gerrit-Reviewer: Milimetric <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits