Samples
Given a table calledliveness containing weekly heartbeat aggregates in column health with timestamp column date,
use this query to see how many times the system was down in a particular week:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Count the number of gaps between live ranges
liveness containing weekly heartbeat aggregates in column health with timestamp column date,
use this query to see how many times the system was down in a particular week:
SELECT num_gaps(health)
FROM liveness
WHERE date = '01-9-2022 UTC'
num_gaps
---------
4
num_gaps(
agg HEARTBEATAGG
) RETURNS BIGINT
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| agg | HeartbeatAgg | - | ✔ | A heartbeat aggregate to get the number of gaps from |
| Column | Type | Description |
|---|---|---|
| num_gaps | bigint | The number of gaps in the aggregate. |