Arguments
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| agg | HeartbeatAgg | - | ✔ | A heartbeat aggregate to get the liveness data from |
| test | TimestampTz | - | ✔ | The time to test the liveness of |
Returns
| Column | Type | Description |
|---|---|---|
| live_at | bool | True if the heartbeat aggregate had a heartbeat close before the test time |
Samples
Given a table calledliveness containing weekly heartbeat aggregates in column health with timestamp column date,
use the following to see if the system was live at a particular time.