Work with v4-from-5%-of-release data to make it easily available to Metrics team

RESOLVED FIXED

Status

()

P2
normal
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: thuelbert, Assigned: spenrose)

Tracking

38 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Comment hidden (empty)
(Reporter)

Updated

3 years ago
Whiteboard: [data-validation]
(Assignee)

Comment 1

3 years ago
On Spark:

from moztelemetry import get_pings
# All of these parameters except schema are mandatory;
# you can add other kwargs such as fraction.
v4 = get_pings(sc, channel='release', version='41.0', schema='v4', doc_type='main')

def in_sample(d):
    return d.get('environment', {}).get('settings', {}).get('isInOptoutSample')

valid = v4.filter(in_sample)

# If you want the inverse, you have to test for "is False" as
# a missing value will result in None, which is false-y in Python
invalid = v4.filter(lambda d: in_sample(d) is False)

Please reopen if you want another API.
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Whiteboard: [data-validation]
You need to log in before you can comment on or make changes to this bug.