mozanalysis.exposure
- class mozanalysis.exposure.ExposureSignal(name: str, data_source: DataSource, select_expr: str, friendly_name: str | None = None, description: str | None = None, window_start: str | None = None, window_end: str | None = None)[source]
Represents a signal that determines an exposure has happened.
The optional
window_start
andwindow_end
parameters define the window of data used to determine whether each client has been exposed.window_start
andwindow_end
are integers, representing the number of days before or after the first enrollment date. Ifwindow_start
is set to None, then by default the first enrollment date is used. Ifwindow_end
is set to None, then by default the last enrollment date is used.- Parameters:
name (str) – A slug; uniquely identifies this exposure signal in tables
data_source (DataSource) – data source to query from
select_expr (str) – a SQL snippet representing a clause of a SELECT expression describing how to compute the exposure signal; must be a boolean condition
friendly_name (str) – A human-readable dashboard title for this exposure signal
description (str) – A paragraph of Markdown-formatted text describing what the exposure signal represents, to be shown on dashboards
window_start (int) – Optional, see above
window_end (int) – Optional, see above