Dataset commands: backfill, refresh
The Dataset Verbs backfill, refresh as CLI commands, with inputs, result, refusals and an example.
curl -X POST https: //api.sb/ ratebook.dev/ datasets/ dataset_UDQXk0KsJB/ refresh \
-H "Authorization: Bearer $SB_TOKEN"
API reference
Dataset.refreshnpx startup-builder do Dataset.refresh --data '{"dataset": "dataset_UDQXk0KsJB"}'
CLI reference
Dataset.refresh{
"name": "do",
"arguments": {
"code": "return await $.Dataset.refresh({ dataset: 'dataset_UDQXk0KsJB' })"
}
}
MCP reference
Dataset.refreshimport { $ } from 'startup-builder'
const dataset = await $.Dataset.refresh({ dataset: 'dataset_UDQXk0KsJB' })
SDK reference
Dataset.refreshReference for Dataset, one group of Dataset commands.
Dataset.backfill
Backfill reads one Source of a Dataset over a past date range and records every value observed in it. Verb page.
npx startup-builder do Dataset.backfill --data '<input>' [--try | --send | --do]Emits Dataset.backfilled.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
dataset | Dataset | required | The Dataset. |
source | Source | required | The Source to read. |
from | date | required | The first day of the range. |
to | date | required | The last day of the range. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
dataset | Dataset | required | The Dataset, with the range filled. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
dataset is missing, or is not a dataset | invalid-input | Send dataset as a dataset, then call it again. | None. |
source is missing, or is not a source | invalid-input | Send source as a source, then call it again. | None. |
from is missing, or is not a date | invalid-input | Send from as a date, then call it again. | None. |
to is missing, or is not a date | invalid-input | Send to as a date, then call it again. | None. |
The Idempotency-Key was sent before with another operation or other input | idempotency-mismatch | Send a new key for new input; reuse a key only to retry the same request. | None. |
Example
npx startup-builder do Dataset.backfill --data '{"dataset": "dataset_UDQXk0KsJB", "source": "source_DIdhfB6mF5", "from": "2026-10-22", "to": "2026-10-22"}' \
--idempotency-key ratebook-dataset-backfill-1Dataset.refresh
Refresh re-reads a Dataset’s Sources now instead of on schedule, and records what changed. Verb page.
npx startup-builder do Dataset.refresh --data '<input>' [--try | --send | --do]Emits Dataset.refreshed.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
dataset | Dataset | required | The Dataset. |
source | Source | One Source to read; absent, every Source. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
dataset | Dataset | required | The Dataset, with refreshedAt set. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
dataset is missing, or is not a dataset | invalid-input | Send dataset as a dataset, then call it again. | None. |
The Idempotency-Key was sent before with another operation or other input | idempotency-mismatch | Send a new key for new input; reuse a key only to retry the same request. | None. |
Example
npx startup-builder do Dataset.refresh --data '{"dataset": "dataset_UDQXk0KsJB"}' \
--idempotency-key ratebook-dataset-refresh-1