# runs

One row per run: a bounded period of activity, such as a test, a sortie, or a session.

Metadata table, so no `dataset_rid` predicate is required.

For how runs bound a period of activity, see [Runs](https://dev.nominal.io/platform/data-model.md#runs) in the data model.

## Columns

| Column | Type | Nullable | Notes |
| --- | --- | --- | --- |
| `run_rid` | `VARCHAR` | No | Resource ID. |
| `run_prefix` | `VARCHAR` | Yes | Prefix component of the run’s identifier. |
| `title` | `VARCHAR` | Yes | Run title. |
| `start_time` | `TIMESTAMP` | No | When the run began. |
| `end_time` | `TIMESTAMP` | Yes | When the run ended. Null while the run is still open. |
| `labels` | `ARRAY` | No | Labels applied to the run. |
| `properties` | `MAP` | No | Key-value properties applied to the run. Read a value with `properties['<key>']['value']`. See [Properties](https://dev.nominal.io/sql-reference/schema/assets.md#asset-properties). |
| `links` | `ARRAY` | No | Links associated with the run. Each element is a map with string keys. |

## Examples

Most recent runs:

```sql
SELECT run_rid, title, start_time, end_time
FROM runs
ORDER BY start_time DESC
LIMIT 20
```

Runs overlapping a window, counting runs that are still open:

```sql
SELECT run_rid, title, start_time, end_time
FROM runs
WHERE (end_time IS NULL OR end_time > TIMESTAMP '2026-07-17 00:00:00')
  AND start_time < TIMESTAMP '2026-07-18 00:00:00'
ORDER BY start_time
```

Longest finished runs, computing duration from the bounds:

```sql
SELECT title,
       EXTRACT(EPOCH FROM end_time) - EXTRACT(EPOCH FROM start_time) AS duration_seconds
FROM runs
WHERE end_time IS NOT NULL
ORDER BY duration_seconds DESC
LIMIT 20
```

> **Note**
>
> A run’s `start_time` and `end_time` describe the period, but `runs` has no `dataset_rid` column. Use the run bounds as a `ts` filter against a telemetry table once you know which dataset to read.

## Next steps

- [run_assets](https://dev.nominal.io/sql-reference/schema/run_assets.md): which assets each run covers.
- [events](https://dev.nominal.io/sql-reference/schema/events.md): points or intervals of interest within a run.
- [datasets](https://dev.nominal.io/sql-reference/schema/datasets.md): data sources you can query telemetry from.
