Skip to content

Commit 022868e

Browse files
committed
docs(skill): align Hotdata SKILL with current CLI flags
- Document -o/--output instead of nonexistent --format - Add datasets create --upload-id and --format - Document HOTDATA_WORKSPACE lock, queries without -w, jobs list pagination - Mention global --debug; clarify workspaces list default marker
1 parent d50982f commit 022868e

1 file changed

Lines changed: 26 additions & 13 deletions

File tree

skills/hotdata/SKILL.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,17 @@ API key resolution (lowest to highest priority):
2525

2626
API URL defaults to `https://api.hotdata.dev/v1` or overridden via `HOTDATA_API_URL`.
2727

28+
Optional: pass **`--debug`** on any command to print verbose HTTP request/response details.
29+
2830
## Workspace ID
2931

30-
All commands that accept `--workspace-id` are optional. If omitted, the active workspace is used. Use `hotdata workspaces set` to switch the active workspace interactively, or pass a workspace ID directly: `hotdata workspaces set <workspace_id>`. The active workspace is shown with a `*` marker in `hotdata workspaces list`. **Omit `--workspace-id` unless you need to target a specific workspace.**
32+
Commands that accept `-w` / `--workspace-id` default to the active workspace from config when omitted. Use `hotdata workspaces set` to switch interactively, or `hotdata workspaces set <workspace_id>` for a direct choice. In `hotdata workspaces list`, the `*` marker labels the **default** workspace the CLI resolves to.
33+
34+
**`hotdata queries` does not take `-w`:** query run history always uses the active workspace—set it with `workspaces set` first if needed.
35+
36+
If **`HOTDATA_WORKSPACE`** is set in the environment, the workspace is **locked** to that value: passing a different `-w` / `--workspace-id` is an error, and **`hotdata workspaces set` fails** (“workspace is locked”). **`workspaces set` is also blocked** while the current process was started under **`hotdata sandbox run`** (nested workspace changes are not allowed in that tree).
37+
38+
**Omit `-w` / `--workspace-id` unless you need to target a specific workspace** (and it is not locked by env or session).
3139

3240
## Workspace context (API)
3341

@@ -60,9 +68,9 @@ Full step-by-step procedures: [references/WORKFLOWS.md](references/WORKFLOWS.md)
6068

6169
### List Workspaces
6270
```
63-
hotdata workspaces list [--format table|json|yaml]
71+
hotdata workspaces list [-o table|json|yaml]
6472
```
65-
Returns workspaces with `public_id`, `name`, `active`, `favorite`, `provision_status`.
73+
Returns workspaces with `public_id`, `name`, `active`, `favorite`, `provision_status`. Table output marks the default workspace with `*`.
6674

6775
### List Connections
6876
```
@@ -83,15 +91,15 @@ hotdata connections refresh <connection_id> [-w <workspace_id>]
8391

8492
#### Step 1 — Discover available connection types
8593
```
86-
hotdata connections create list [--workspace-id <workspace_id>] [--format table|json|yaml]
94+
hotdata connections create list [-w <workspace_id>] [-o table|json|yaml]
8795
```
8896
Returns all available connection types with `name` and `label`.
8997

9098
#### Step 2 — Inspect the schema for a specific type
9199
```
92-
hotdata connections create list <name> [--workspace-id <workspace_id>] [--format json]
100+
hotdata connections create list <name> [-w <workspace_id>] [-o json]
93101
```
94-
Returns `config` and `auth` JSON Schema objects describing all required and optional fields for that connection type. Use `--format json` to get the full schema detail.
102+
Returns `config` and `auth` JSON Schema objects describing all required and optional fields for that connection type. Use **`-o json`** to get the full schema detail.
95103

96104
- `config` — connection configuration fields (host, port, database, etc.). May be `null` for services that need no configuration.
97105
- `auth` — authentication fields (password, token, credentials, etc.). May be `null` for services that need no authentication. May be a `oneOf` with multiple authentication method options.
@@ -140,7 +148,7 @@ hotdata connections create \
140148

141149
### List Tables and Columns
142150
```
143-
hotdata tables list [--workspace-id <workspace_id>] [--connection-id <connection_id>] [--schema <pattern>] [--table <pattern>] [--limit <int>] [--cursor <cursor>] [--format table|json|yaml]
151+
hotdata tables list [-w <workspace_id>] [-c <connection_id>] [--schema <pattern>] [--table <pattern>] [--limit <int>] [--cursor <cursor>] [-o table|json|yaml]
144152
```
145153
- Default format is `table`.
146154
- **Always use this command to inspect available tables and columns.** Do NOT use the `query` command to query `information_schema` for this purpose.
@@ -156,15 +164,15 @@ Datasets are managed files uploaded to Hotdata and queryable as tables.
156164

157165
#### List datasets
158166
```
159-
hotdata datasets list [--workspace-id <workspace_id>] [--limit <int>] [--offset <int>] [--format table|json|yaml]
167+
hotdata datasets list [-w <workspace_id>] [--limit <int>] [--offset <int>] [-o table|json|yaml]
160168
```
161169
- Default format is `table`.
162170
- Returns `id`, `label`, `table_name`, `created_at`.
163171
- Results are paginated (default 100). Use `--offset` to fetch further pages.
164172

165173
#### Get dataset details
166174
```
167-
hotdata datasets <dataset_id> [--workspace-id <workspace_id>] [--format table|json|yaml]
175+
hotdata datasets <dataset_id> [-w <workspace_id>] [-o table|json|yaml]
168176
```
169177
- Shows dataset metadata and a full column listing with `name`, `data_type`, `nullable`.
170178
- Use this to inspect schema before querying.
@@ -175,12 +183,14 @@ hotdata datasets create --label "My Dataset" --file data.csv [--table-name my_da
175183
hotdata datasets create --label "My Dataset" --sql "SELECT * FROM ..." [--table-name my_dataset] [--workspace-id <workspace_id>]
176184
hotdata datasets create --label "My Dataset" --query-id <saved_query_id> [--table-name my_dataset] [--workspace-id <workspace_id>]
177185
hotdata datasets create --label "My Dataset" --url "https://example.com/data.parquet" [--table-name my_dataset] [--workspace-id <workspace_id>]
186+
hotdata datasets create --label "My Dataset" --upload-id <upload_id> [--format csv|json|parquet] [--table-name my_dataset] [-w <workspace_id>]
178187
```
179188
- `--file` uploads a local file. Omit to pipe data via stdin: `cat data.csv | hotdata datasets create --label "My Dataset"`
180189
- `--sql` creates a dataset from a SQL query result.
181190
- `--query-id` creates a dataset from a previously saved query.
182191
- `--url` imports data directly from a URL (supports csv, json, parquet).
183-
- `--file`, `--sql`, `--query-id`, and `--url` are mutually exclusive.
192+
- `--upload-id` uses an upload the API already accepted; **`--format`** (default `csv`) applies only with `--upload-id`.
193+
- `--file`, `--sql`, `--query-id`, `--url`, and `--upload-id` are mutually exclusive.
184194
- Format is auto-detected from file extension (`.csv`, `.json`, `.parquet`) or file content.
185195
- `--label` is optional when `--file` is provided — defaults to the filename without extension. Required for `--sql` and `--query-id`.
186196
- `--table-name` is optional — derived from the label if omitted.
@@ -251,11 +261,14 @@ hotdata results <result_id> [-w <workspace_id>] [-o table|json|csv]
251261
hotdata queries list [--limit <int>] [--cursor <token>] [--status <csv>] [-o table|json|yaml]
252262
hotdata queries <query_run_id> [-o table|json|yaml]
253263
```
264+
These commands use the **active workspace only** (there is no `-w` / `--workspace-id` on `queries`); set the default workspace with `workspaces set` if needed.
254265
- `list` shows query runs with status, creation time, duration, row count, and a truncated SQL preview (default limit 20).
255266
- `--status` filters by run status (comma-separated, e.g. `--status running,failed`).
256267
- View a run by ID to see full metadata (timings, `result_id`, snapshot, hashes) and the formatted, syntax-highlighted SQL.
257268
- If a run has a `result_id`, fetch its rows with `hotdata results <result_id>`.
258269

270+
To create a dataset from a **saved query** still registered for the workspace, use **`hotdata datasets create --query-id <saved_query_id>`** (this CLI does not expose separate saved-query create/run subcommands).
271+
259272
### Search
260273
```
261274
# BM25 full-text search
@@ -286,8 +299,8 @@ hotdata indexes create -c <connection_id> --schema <schema> --table <table> --na
286299

287300
### Jobs
288301
```
289-
hotdata jobs list [--workspace-id <workspace_id>] [--job-type <type>] [--status <status>] [--all] [--format table|json|yaml]
290-
hotdata jobs <job_id> [--workspace-id <workspace_id>] [--format table|json|yaml]
302+
hotdata jobs list [-w <workspace_id>] [--job-type <type>] [--status <status>] [--all] [--limit <n>] [--offset <n>] [-o table|json|yaml]
303+
hotdata jobs <job_id> [-w <workspace_id>] [-o table|json|yaml]
291304
```
292305
- `list` shows only active jobs (`pending`, `running`) by default. Use `--all` to see all jobs.
293306
- `--job-type`: `data_refresh_table`, `data_refresh_connection`, `create_index`.
@@ -395,7 +408,7 @@ Other commands (not covered in detail above): `hotdata connections new` (interac
395408
```
396409
2. Inspect the schema for the desired type:
397410
```
398-
hotdata connections create list <type_name> --format json
411+
hotdata connections create list <type_name> -o json
399412
```
400413
3. Collect required config and auth field values from the user or environment. **Never hardcode credentials — use env vars or files.**
401414
4. Create the connection:

0 commit comments

Comments
 (0)