# datasets

One row per dataset. This is the usual entry point for a session, because telemetry queries have to name the dataset(s) they read and this table needs no scoping to read.

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

For how datasets hold ingested data, see [Datasets](https://dev.nominal.io/platform/data-model.md#time-series-data) in the data model.

## Columns

| Column | Type | Nullable | Notes |
| --- | --- | --- | --- |
| `dataset_rid` | `VARCHAR` | No | Resource ID. This is the value telemetry queries filter on. |
| `name` | `VARCHAR` | No | Dataset name. |
| `description` | `VARCHAR` | Yes | Free-text description. |
| `labels` | `ARRAY` | No | Labels applied to the dataset. |
| `properties` | `MAP` | No | Key-value properties applied to the dataset. Read a value with `properties['<key>']['value']`. See [Properties](https://dev.nominal.io/sql-reference/schema/assets.md#asset-properties). |
| `bounds_start` | `TIMESTAMP` | Yes | Earliest data time across the dataset. Null when the dataset holds no data, or has no stored bounds. |
| `bounds_end` | `TIMESTAMP` | Yes | Latest data time across the dataset. Null when the dataset holds no data, or has no stored bounds. |

Some datasets, such as the one behind a newly created asset, have no stored bounds, so their `bounds_start` and `bounds_end` are null even when they hold data.

## Examples

Find a dataset to query:

```sql
SELECT dataset_rid, name FROM datasets LIMIT 20
```

Search by name. Matching is case-sensitive, so normalize when you’re unsure of the casing:

```sql
SELECT dataset_rid, name, bounds_start, bounds_end
FROM datasets
WHERE UPPER(name) LIKE '%<NAME TEXT>%'
ORDER BY name
```

Only datasets with stored bounds, latest first:

```sql
SELECT dataset_rid, name, bounds_start, bounds_end
FROM datasets
WHERE bounds_start IS NOT NULL
ORDER BY bounds_start DESC
LIMIT 20
```

Filter on a property:

```sql
SELECT dataset_rid, name
FROM datasets
WHERE properties['<key>']['value'] = '<value>'
ORDER BY name
```

> **Note**
>
> `bounds_start` and `bounds_end` span the whole dataset. Individual channels may cover narrower ranges; query [`channels`](https://dev.nominal.io/sql-reference/schema/channels.md) to see which channels exist.

## Next steps

- [channels](https://dev.nominal.io/sql-reference/schema/channels.md): what’s inside a dataset.
- [points_double](https://dev.nominal.io/sql-reference/schema/points_double.md): read the samples.
