| name | atlys-segment-comparison |
| description | Use when comparing an Atlys metric across segments (device, os, geo/country, destination, user type, acquisition) to find where performance is unusually good or bad. Provides normalization for messy data and volume guardrails. |
Skill: Segment Comparison
Goal: compare a metric across segments to find where something is unusually good or
bad, with enough rigor that a PM can trust it. Compute in ClickHouse; return top-N.
Standard segment dimensions
- Device:
lower(device_type) and os (handle NULL os with android device_type).
- Geo:
geoip_country_code (ISO-2), optionally geoip_subdivision_1_code.
- Destination:
destination.
- User:
is_new_user (auth), is_guest, is_enterprise, co_travelers.
- Acquisition:
gclid != '' => paid search.
Normalization (apply and state it)
Flat tables:
lower(coalesce(nullIf(device_type,''),'unknown')) AS device_norm,
coalesce(nullIf(os,''), if(lower(device_type)='android','android','unknown')) AS os_norm,
upper(((geoip_country_code,),)) geo