Skip to content
Lucas Lessa
Voltar para as notícias
DatabricksGAImpacto: Médio

Metric view window measures are now generally available

Window measures in metric views are now generally available in Unity Catalog, enabling rolling, cumulative, and semiadditive aggregations.

O que mudou

Window measures in metric views allow you to define advanced calculations such as moving averages, running totals, and period-over-period changes in a centralized way.

Use cases

Imagine you need to calculate a thirty-day moving average for sales or a year-to-date running total without rewriting the same logic across queries.

  • Create rolling averages.
  • Calculate cumulative totals.
  • Measure period-over-period changes.

How to use

You define window measures using the YAML syntax supported by Unity Catalog in your metric views.

measures:
  - name: running_revenue
    expression: sum(revenue)
    window:
      order_by: [sale_date]
      frame: cumulative

What happens in this code:

  1. The running revenue metric is declared using the expression block.
  2. The window clause defines the temporal ordering and the cumulative frame type.

Limitations and requirements

This feature is generally available (GA) for metric views within Unity Catalog.

Ver nota oficial do Databricks

Metric view window measures are generally available

Resumo e explicação gerados por IA a partir da release note oficial. Em caso de dúvida, a documentação oficial da plataforma prevalece.

Relacionadas