Open Bug 1841901 Opened 2 years ago Updated 1 year ago

Make metric definitions reusable across multiple platforms/products

Categories

(Data Platform and Tools :: General, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: ascholtz, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [dataplatform])

In many cases, metric definitions across various products are identical. Currently, if a metric should be available across products, a definition needs to be added to the definition file for each product. This quickly gets cumbersome, especially since the number of products is growing.

Instead it should be possible to somehow reference metric definitions or make them available for multiple products without multiple redefinitions.

One way to achieve this is to expand the jinja templates. Additional parameters could be defined for metric and datasource definitions that could be referenced in the select_expression or from_expression. An additional parameter for defining a set of products would work in this case:

[metric.example_metric_cross_product_v1]
select_expression = "COUNT(*)"
data_source = "baseline" # baseline would need to exist for all these referenced platforms
platforms = ["fenix", "firefox_ios"]


[data_sources.baseline]
from_expression = "mozdata.{{platform}}.baseline"
platforms = ["fenix", "firefox_ios"]

[meta] Work towards metric-hub

Summary: Make metric definitions reusable across multiple platforms/produce → Make metric definitions reusable across multiple platforms/products
You need to log in before you can comment on or make changes to this bug.