You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 230b564
Browse filesBrowse the repository at this point in the historyBrowse files
docs: correct format and declaration claims the code no longer matches
A deliberate sweep for parquet-only language, after finding two stale
spots by accident.
README's command table and the workflow decision guide still described
`databases load` as parquet-only and instant databases as "parquet files
you own". Both now name csv, newline-delimited json, and parquet, and
the table lists `databases tables add`.
The instant-database workflow carried a callout that was materially
wrong after this branch: it warned that loading into an undeclared table
recreates the database and changes its `id`, and advised against caching
ids across loads. The load declares a missing table and schema in place,
so the id and the other tables survive. The workflow now shows the
declare-a-key step and records that a key cannot be added later.
Two code comments justified themselves by the removed delete+recreate
path: the raw JSON create-request builder ("the delete+recreate path
still consumes the raw JSON form, so the JSON builder stays") and
`delete_raw`'s doc. Both are still used for other reasons, so only the
reasons are corrected.
|**Declare schema up front**|Optional — the load declares a missing table/schema. Declare with `databases tables add --key` when you need the keyed load modes; a key cannot be added later|
101
+
|**File uploads**|`databases load --file` / `--url` / `--upload-id`; format from the extension, or `--format`|
102
+
|**Refresh**|`databases load` again — `--mode replace` (default) or `append`, or `delete`/`update`/`upsert` against a declared key|
103
103
104
-
**Rule of thumb:**Parquet files you control as **`mydb.public.orders`** → **instant databases**.
104
+
**Rule of thumb:**Files you control as **`mydb.public.orders`** → **instant databases**.
105
105
106
-
### Workflow: instant database (parquet)
106
+
### Workflow: instant database (file upload)
107
107
108
108
1. Create the database with a catalog alias:
109
109
110
110
```bash
111
111
hotdata databases create --catalog sales
112
112
```
113
113
114
-
2. Load parquet per table (tables are auto-declared if needed):
114
+
2. Load a file per table. A missing table or schema is declared as part of the
115
+
load, and the format comes from the file's extension:
> Auto-declaring a *new* table recreates the database (no add-table API), which **changes its `id`** — the id returned by `databases create` goes stale after the next `load` of an undeclared table. Declare tables up front (`databases create --table orders --table customers`) to avoid the recreate, and don't cache ids across loads: re-read the current id from `databases list` at time of use. (Selection is still always by id — names and catalogs are not unique.)
122
+
> The database keeps its `id` and its other tables across a load into an
123
+
> undeclared table — nothing is recreated. Selection is still always by id,
124
+
> since names and catalogs are not unique.
122
125
123
-
3. Confirm and query:
126
+
3. Declare the table yourself only when you need something the load cannot
0 commit comments