01 / 21

Data Documentation
& Metric Definitions

Learn how to document data assets, write clear metric definitions, and build a single source of truth for business analytics.

Business Analytics

What Is Data Documentation?

Data documentation is the practice of recording metadata, definitions, and context about every data asset in an organization. It answers three fundamental questions: What does this data mean? Where does it come from? and How should it be used?

Why Documentation Matters

✓ Trust
Stakeholders trust reports when they can trace every number to a documented definition.
✓ Speed
New team members onboard faster when data assets are described in plain language.
✓ Accuracy
Shared definitions prevent different teams from calculating the same metric in contradictory ways.

Key Terms You Need to Know

1
Data Dictionary: A catalog listing every column/field in a dataset with its name, type, allowed values, and description.
2
Metric Definition: A precise specification of how a business measure is calculated, including its formula, filters, and grain.
3
Data Lineage: The record of where data originates, how it is transformed, and where it flows downstream.
4
Metadata: "Data about data": creation date, owner, update frequency, data type, and access permissions.

Anatomy of a Metric Definition

Metric Definition "Monthly Active Users" Owner: Product Analytics Name + Description Formula Filters + Grain Data Source Update Cadence

The Golden Rule of Metrics

This is the reproducibility standard. If a definition is ambiguous, different reports will show different figures for the same metric, eroding stakeholder trust.

Achieving reproducibility requires specifying: the exact formula (including edge cases), the filters applied, the time grain (daily, weekly, monthly), and the source table or system.

Data Dictionary vs. Metric Definition

Data Dictionary Metric Definition
Scope Individual columns/fields Business-level measures
Content Name, type, allowed values Formula, filters, grain, source
Audience Data engineers, developers Analysts, managers, executives
Example order_date: DATE, not null Revenue: \(\sum \text{sales} - \sum \text{returns}\)
Updates When schema changes When business logic evolves

How to Write a Metric Definition

1
Name the metric: Use a clear, unambiguous name understood across departments (e.g., "Monthly Active Users", not "MAU v2").
2
Write a plain-language description: One to two sentences explaining what the metric measures and why it matters.
3
Specify the formula: Include exact calculations, like \(\text{Revenue} = \sum(\text{price} \times \text{qty}) - \sum(\text{refund_amount})\).
4
Define filters and grain: State inclusions/exclusions (e.g., "Excludes test accounts") and time period (daily, monthly).
5
Document source and owner: Name the source table/system and the team responsible for maintaining the definition.

Example 1: Monthly Active Users

Monthly Active Users (MAU) DESCRIPTION Count of unique users who performed at least 1 action in a calendar month. FORMULA
\(\text{COUNT(DISTINCT } user\_id \text{) WHERE } action\_date \text{ IN } [\text{month\_start, month\_end}]\)
FILTERS Exclude internal/test accounts (is_test = FALSE). Include all platforms. SOURCE / OWNER events.user_actions | Product Analytics Team | Updated daily

Example 2: Net Revenue

Net Revenue DESCRIPTION Total revenue after subtracting refunds and discounts. FORMULA
\(\sum \text{gross\_amount} - \sum \text{refund\_amount} - \sum \text{discount\_amount}\)
FILTERS status IN ('completed','partially_refunded'). Excludes cancelled orders. SOURCE / OWNER finance.transactions | Finance Team | Updated daily

Example 3: Tracing Data Lineage

CRM System Raw signups Payment API Transactions Web Analytics Page events ETL Pipeline Clean + Join + Aggregate Data Warehouse analytics.metrics Source Transform Destination

Building a Data Dictionary

Column Name Data Type Description Example
user_id INTEGER Unique user identifier 10042
signup_date DATE Date of account creation 2024-03-15
plan_type VARCHAR Subscription tier premium
is_test BOOLEAN Internal test account flag FALSE

The Three Metadata Layers

Technical
Data types, table schemas, storage format, primary/foreign keys, update timestamps.
Business
Metric definitions, KPI ownership, plain-language descriptions, department context.
Operational
Refresh frequency, pipeline status, data quality scores, access permissions.

The Documentation Lifecycle

Create Draft definition Review Peer approval Publish Share in catalog Maintain Update Business logic changes → restart cycle

Common Mistakes to Avoid

✕ Vague Names
Using names like "Revenue v2" or "Users_final_FINAL" that carry no clear meaning outside the team that created them.
✕ Missing Filters
Defining "Active Users" without specifying whether test accounts, bots, or inactive trials are included or excluded.
✕ No Owner
Leaving documentation without an assigned owner means no one is responsible for updating it when logic changes.

Documentation Summary

Artifact Contains Primary Audience
Data Dictionary Column names, types, allowed values Engineers, developers
Metric Definition Formula, filters, grain, source, owner Analysts, executives
Data Lineage Map Source → transform → destination flow Data ops, quality team
Data Catalog Searchable index of all documented assets Everyone in the org
Change Log History of definition changes with dates Auditors, governance team

Question 1 of 5

What is the primary purpose of a metric definition?

Question 2 of 5

Which of the following is NOT a required element in a complete metric definition?

Question 3 of 5

A company defines "Monthly Active Users" as "anyone who visited our website". Two analysts get different numbers. What is the most likely cause?

Question 4 of 5

A data dictionary is best described as:

Question 5 of 5

Which metadata layer would include information about pipeline refresh frequency and data quality scores?