Create a dataset
create_datasetCreates a named table that views read with useDataset(name). Define typed columns and a key: the column(s) that uniquely identify a row (e.g. ["month"], or ["date","campaign"]). The key makes updates idempotent: pushing a row with an existing key updates it instead of duplicating it. You can pass initial rows in the same call. Prefer tidy, raw-ish data (one row per month/day/entity with numeric columns) over pre-aggregated text; views compute totals and deltas themselves. Check get_workspace first: if a dataset with this data already exists, add to it with upsert_rows.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Column(s) that uniquely identify a row, e.g. ["month"] or ["date","campaign"]. | |
| name | Yes | snake_case, content + grain, e.g. "mrr_monthly", "ad_spend_daily". Permanent. | |
| rows | No | Initial rows: [{"month": "2026-01", "mrr": 41200}, …]. | |
| columns | Yes | Every column, the key columns included. | |
| description | Yes | What one row represents and where the data comes from. | |
| update_cadence | No | How often this data is expected to be refreshed. The app flags the dataset as stale when overdue. |