> ## Documentation Index
> Fetch the complete documentation index at: https://docs.erdo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Owners, records and row sources

> Say who answers for a shared dataset, whether it holds the record or mirrors another system, and require every row to carry its source.

A durable dataset (class `table`) can declare three things to the people who
share it:

* **An owner**: the person who answers for the data. Ownership is
  accountability, not access. Sharing still decides who can read or edit.
* **A record role**: `record` when this dataset is the source of truth for its
  rows, or `mirror` when it copies a record another system holds, such as
  "Attio people". A mirror tells people where to fix a fact.
* **Row provenance**: every row must say where its facts came from and when
  they were last checked. Once this is on, a write whose rows leave either
  column blank is refused, and the error names those rows.

All three are opt-in. A dataset that declares none of them behaves as before.
Scratch datasets cannot carry them; promote one to `table` first, or in the
same request.

## From the CLI

```bash theme={null}
erdo datasets set-owner acme.ipo-fund-partners me
erdo datasets set-owner acme.ipo-fund-partners dana@acme.example
erdo datasets set-record acme.ipo-fund-partners mirror --of "Attio people"
erdo datasets set-record acme.liquidity record
erdo datasets require-provenance acme.liquidity
erdo datasets require-provenance acme.liquidity --source-column source --checked-at-column verified_at
erdo datasets require-provenance acme.liquidity --off
```

The owner can be named by email, by user id, or as `me`, and must be a member
of the dataset's organization. Each command has a `--clear` (or `--off`) form
that removes the declaration.

`erdo datasets schema <slug> --declared` prints the declarations after the
declared columns.

## Row provenance

The source and checked-at columns default to `source_url` and `checked_at`.
When the dataset has a declared schema, both columns must be in it; add them
with an `add_column` operation first. While the requirement is on, a schema
change that would drop either column is refused unless the same request turns
provenance off.

A value is blank when it is missing, empty or only whitespace. On a merge, a row
that already stores a source and a checked-at value keeps them, so an update
only needs the columns it changes. A new row always needs both.

## REST and MCP

Send the declarations to `POST /v1/datasets/:datasetSlug/schema`, the same
route that sets class and purpose. In MCP, use `erdo_update_dataset_schema`.
Omitted fields are left unchanged.

```json theme={null}
{
  "owner": "me",
  "record_role": "mirror",
  "record_of": "Attio people",
  "provenance_required": true
}
```

| Field | Meaning |
| - | - |
| `owner` | Email, user id or `me`. `clear_owner: true` removes it. |
| `record_role` | `record` or `mirror`. A mirror requires `record_of`. `clear_record_role: true` removes both. |
| `record_of` | Where a mirror's record lives, in your own words. |
| `provenance_required` | `true` turns the requirement on, `false` turns it off. |
| `provenance_source_column`, `provenance_checked_at_column` | Column names, with `provenance_required: true`. |

The response, the `declared_schema` view of `POST /v1/datasets/:datasetSlug/fetch`,
and `erdo_get_dataset_schema` all carry the declarations under `stewardship`:

```json theme={null}
{
  "stewardship": {
    "owner": {"user_id": "…", "email": "dana@acme.example", "name": "Dana"},
    "record_role": "mirror",
    "record_of": "Attio people",
    "row_provenance": {"source_column": "source_url", "checked_at_column": "checked_at"}
  }
}
```

`stewardship` is absent when the dataset declares none of them.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.