Store state with Hyjal Tables
This tutorial creates a Hyjal Table in the Console, reads
and writes it from the api Resource through the Door, and watches Console
edits appear live in your API responses. Hyjal Tables are per-Project relational
tables stored in the Project Bucket, so you get app state
without provisioning an external database.
Time: about fifteen minutes. You need the hyjal CLI, a
logged-in session, and the acme Project with an api Resource.
1. Create a table in the Console
Open the Project in the Console and select
the Tables tab. Create a table named notes with these columns:
The grid appears empty, ready for rows. See Create tables for the full column-type reference.
2. Add a row in the grid
In the notes grid, add a row with body set to first note. The grid writes
it immediately. Hyjal Tables use single-writer semantics per table group, so the
Console edit and your API share one consistent view.
3. Query the table from your API
Read the table from the api Resource through the Door. The Door exposes scoped
SQL over HTTP; the hyjal-db client handles the request.
The Door is a host-provided capability, so there is no connection string to allowlist and no secret to set for Tables access: the platform scopes it to your Project.
4. Deploy and read the row
Call the endpoint. The row you added in the grid appears in the response:
5. Watch edits appear live
Add a second row in the Console grid with body set to second note. Call the
endpoint again, no redeploy:
The Console grid and your API read the same table. Reads scale with the fleet, so every instance sees the write.
6. Write from the API
Writing back from the API shows up in the grid the same way. Add an insert path:
After a request hits that path, the new row appears in the Console notes grid
on the next refresh.
What you built
- A
notesHyjal Table created and edited in the Console grid. - An
apiResource that reads and writes the table through the Door. - A live loop where Console edits and API writes share one consistent view.
Next steps
- Query patterns and types: Hyjal Tables
- Edit and manage data in the Console: Edit in Console
- Import and export table data: Import and export