You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org

Analytics/Data Lake/Schemas/Metric results: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>Joal
m (Joal moved page Analytics/Data Lake/Metric results to Analytics/Data Lake/Schemas/Metric results: Organizing doc before first internal production release.)
 
imported>MarcoAurelio
m (Bot: Fixing double redirect to Analytics/Data Lake/Edits/Metrics)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Overview=
#REDIRECT [[Analytics/Data Lake/Edits/Metrics]]
 
This table is dynamically partitioned on wiki_db and metric and holds metric results per wiki per time period.  So an example row would beː (enwiki, daily_edits, 2012-09-10, 12345).  As a result of the dynamic partitioning, inserting data into this table creates separate directories with single files for each wiki and metric.  This allows the files to be easily copied to datasets.wikimedia.org for display in dashiki dashboards.
 
=Schema=
 
<pre>
CREATE EXTERNAL TABLE `wmf.mediawiki_metric`(
  `dt`      string  COMMENT 'The date of this measurement, as YYYY-MM-DD',
  `value`  bigint  COMMENT 'The measurement'
)
COMMENT
  'See most up to date documentation at https://wikitech.wikimedia.org/wiki/Analytics/Data_Lake/Metric_results'
PARTITIONED BY
(
    `wiki_db`  string  COMMENT 'The wiki this measurement pertains to',
    `metric`    string  COMMENT 'The metric being computed to measure'
)
</pre>

Latest revision as of 19:01, 13 July 2017