mozilla / mozanalysis

A library for Mozilla experiments analysis
https://mozilla.github.io/mozanalysis/
Mozilla Public License 2.0
9 stars 13 forks source link

Supporting dynamic downsampling for enrollments query #187

Closed mikewilli closed 11 months ago

mikewilli commented 11 months ago

Downsampling is an useful tool for enrollments queries on large experiments, but the easiest way to do this right now involves overriding the entire enrollments query to add a WHERE sample_id <= {value} clause without changing the rest of the template.

We should look into adding another parameter to the _build_enrollments_query_normandy function so that we can more easily specify a sample rate for enrollment queries. This should allow us to add support in metric-hub and metric-config-parser for a sample_rate (or similar) parameter that could get injected into the query from jetstream.

danielkberry commented 11 months ago

Ideally, this would work for mobile experiments as well, though they definitely suffer from this issue less

mikewilli commented 11 months ago

Yea true, might as well add it as an option to all of the enrollments queries.