Skip to main content
The dim_semantic_metric_catalog table provides a comprehensive, always-current reference for all metrics available in the SourceMedium semantic layer. Unlike static documentation, this table is dynamically generated from the actual metric definitions, ensuring it always reflects the current state of your metrics.
This is the source of truth for metric definitions. The catalog currently contains 180+ metrics. Query this table to discover available metrics, understand their calculations, and find the right metric for your analysis.

Use Cases

  • Metric Discovery: Find all available metrics and filter by category or type
  • Understanding Calculations: See exactly how each metric is calculated
  • Dependency Tracking: Identify which metrics depend on other metrics
  • Alias Resolution: Map abbreviated metric names (like aov) to their full descriptive names
  • Documentation: Generate metric documentation for your team

Schema

Example Queries

Find All Revenue Metrics

Discover Marketing Efficiency Metrics

Resolve an Abbreviated Metric Name

Find All Abbreviations for a Metric

List All Cumulative (MTD/QTD/YTD) Metrics

Find Metrics by Underlying Data Source

Explore Metric Dependencies

Get Canonical Metric Names (Resolving Aliases)

Metric Types Explained

Direct aggregations of a single measure. These are the building blocks for other metric types.Examples:
  • order_net_revenue = SUM(order_net_revenue)
  • order_count = SUM(valid_order_count)
  • new_customers = SUM(customer_count) with filter
Calculation column shows: SUM(measure_name) or SUM(measure_name) WHERE [filter applied]
Division of two metrics, typically used for averages and rates.Examples:
  • average_order_value_net = order_net_revenue / order_count
  • customer_acquisition_cost = total_ad_spend / new_customer_order_count
  • click_through_rate = total_ad_clicks / total_ad_impressions
Calculation column shows: numerator_metric / denominator_metric
Custom calculations combining multiple metrics with expressions.Examples:
  • cost_per_thousand_impressions = total_ad_spend * 1000 / total_ad_impressions
  • gross_margin = gross_profit / order_net_revenue
Calculation pattern: Custom SQL expression
Running totals that accumulate over time periods.Grain-to-date:
  • mtd_net_revenue = Month-to-date net revenue (resets each month)
  • qtd_net_revenue = Quarter-to-date net revenue
  • ytd_net_revenue = Year-to-date net revenue
Trailing windows:
  • trailing_30d_revenue = Revenue for the last 30 days
  • trailing_90d_revenue = Revenue for the last 90 days
Calculation column shows: CUMULATIVE_SUM(measure_name)

Metric Categories

Common Aliases Reference

The semantic layer supports abbreviated metric names for convenience. Always use the full descriptive name for new implementations.
Query the catalog with WHERE is_abbreviation = true to see all available aliases and their preferred metric names.

Best Practices

1

Use Full Metric Names

For new dashboards and queries, always use the full descriptive metric name (e.g., average_order_value_net instead of aov). This improves readability and maintainability.
2

Check Dependencies Before Filtering

When filtering metrics, check the dependent_metrics column to understand what underlying data will be affected. Ratio and derived metrics may behave unexpectedly with certain dimension filters.
3

Match Semantic Models for Joins

When combining metrics in a query, prefer metrics from the same semantic_model_name for consistent dimension availability. Mixing metrics from different semantic models may limit available dimensions.
4

Use Cumulative Metrics for Period Totals

For MTD, QTD, or YTD reporting, use the pre-built cumulative metrics instead of writing custom window functions. They handle edge cases like partial periods correctly.