Big Data 13 min read

Metric Library: Indicator Management System Practice at YouZan

YouZan’s Metric Library is a unified indicator management system that resolves inconsistent metric definitions, duplicate development, and unclear lineage by standardizing dimensions, atomic metrics, modifiers, and automatically generating derived metrics, then supporting scheduling, batch operations, and online APIs through integration with its data warehouse and service platforms.

Youzan Coder
Youzan Coder
Youzan Coder
Metric Library: Indicator Management System Practice at YouZan

This article introduces YouZan's Metric Library (指标库), a comprehensive indicator management system designed to address challenges in data metric definition, development, and usage within a data middle platform.

Challenges Addressed:

Inconsistent metric definitions across different pages causing data discrepancies

Duplicate metric development by different data engineers using different source tables

Lack of standardized processes for metric development and unclear data lineage

Core Concepts:

Dimensions (维度): Perspectives for observing business data, typically used in SQL GROUP BY clauses (e.g., store dimension, product dimension)

Atomic Metrics (原子指标): Basic, indivisible metrics based on business events (e.g., payment amount, order count)

Modifiers (修饰词): Specific values of dimensions that filter data in SQL WHERE clauses (e.g., time period, channel)

Derived Metrics (派生指标): Combinations of dimensions + atomic metrics + modifiers that represent concrete, business-meaningful indicators (e.g., store's payment amount in the last 1 day)

Development Process:

Data warehouse defines business domains and imports unified middle-layer tables

Define atomic metrics, dimensions, and modifiers with proper table field associations

Generate derived metrics automatically using SQL generation capabilities

Apply derived metrics by creating scheduling tasks and online APIs

Key Features:

Data source synchronization from unified data warehouse middle layers

Dimension management with master tables and associated fact tables

Atomic metric management with table associations and aggregation methods

Modifier management for filtering conditions

Metric shopping cart for batch operations and API generation

The Metric Library integrates with YouZan's data development platform and unified data service platform to provide end-to-end indicator services from definition to scheduling and online querying.

Business Intelligenceindicator systemdata middle platformDerived MetricsDimension ManagementMetric Management
Youzan Coder
Written by

Youzan Coder

Official Youzan tech channel, delivering technical insights and occasional daily updates from the Youzan tech team.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.