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

# upstack saved

> Cache query parameters locally for reuse. Run, list, inspect, and delete saved queries.

Cache query parameters locally for reuse. Saved queries live in `~/.upstack_saved/`, one JSON file per query.

## Subcommands

### `create <name>`

```bash theme={null}
upstack saved create morning-report --command query --from-file ./params.json
```

| Flag | Description |
| - | - |
| `--command <c>` | Required. One of `query`, `query-attribution`, `query-cohort`, `query-channel-details`. |
| `--from-file <path>` | JSON file with the query parameters. |
| `--description <text>` | Optional description for the saved query. |
| `--force` | Overwrite if a saved query with this name already exists. |

You can also pass query parameters inline as flags (e.g. `--measures orders.gross_revenue`, `--date-start 2026-04-01`, `--filter '{"and":[...]}'`) — they're merged with the file values; flags override file values. Every query flag the underlying command accepts works here, including the attribution flags (`--dimension`, `--model`, `--window`, `--value-source`, `--conversion-event`) and, for `query-channel-details`, `--limit`, `--offset`, `--sort-by`, and `--sort-direction`.

Run [`upstack filters --detail`](https://docs.upstackdata.com/cli/filters) to discover valid filter fields before constructing a `--filter` value.

### `list`

```bash theme={null}
upstack saved list
```

### `show <name>`

Inspect a saved query without running it.

```bash theme={null}
upstack saved show morning-report
```

### `run <name>`

Re-run a saved query.

```bash theme={null}
upstack saved run morning-report
upstack saved run morning-report --output csv --file ./today.csv   # override output on the fly
```

Override parts of the saved query without editing it:

| Flag | Description |
| - | - |
| `--date-start <date>` `--date-end <date>` | Replace the saved date range (each end is kept independently if only one is passed). |
| `--timezone <tz>` | Override the timezone. |
| `--currency <code>` | Override the currency. |
| `--output <format>` | `json`, `table`, or `csv`. |
| `--file <path>` | Write output to a file instead of stdout. |

Only the `output` [config default](https://docs.upstackdata.com/cli/config-defaults.md) applies to `run` — the saved parameters are passed through as stored.

### `delete <name>`

```bash theme={null}
upstack saved delete morning-report
```


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