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

From Wikitech-static
< Analytics‎ | Data Lake
Revision as of 14:18, 24 March 2017 by imported>Joal (Joal moved page Analytics/Data Lake/Metric results to Analytics/Data Lake/Schemas/Metric results: Organizing doc before first internal production release.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

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

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'
)