A session captures the full working state of TableViewer:
- Opened files (paths, aliases, filetypes, delimiters, jaq filters)
- Current SQL query
- Query history and pinned queries
- Notes
Sessions are stored per-profile in a local SQLite database (sessions.db).
Open via Gear → Sessions → Manager (or ⌘S shortcut).
- Click 💾 Save — enter a name and confirm
- The session is saved and becomes the active session
If a session is active (name shown in the manager header), click Update to overwrite it with the current state. This is the equivalent of "Ctrl+S" in an editor.
Click any session in the list. If the session references local files that no longer exist, a Session Warning dialog appears (see below).
Click ✕ next to a session name.
| Gear menu action | Description |
|---|---|
| Sessions → Save as… | Save current state under a new name without opening the full manager |
| Sessions → Load from… | Import a .tar.gz archive directly |
| Sessions → Export as… | Export the current in-memory state as a .tar.gz archive |
Session archives let you share sessions across machines or back them up.
| Item | Included |
|---|---|
| Session metadata (SQL, history, pinned queries, notes) | ✅ |
| Copies of referenced local files | ✅ |
| Profile preferences | ✅ |
| Remote file URLs | ✅ (URL only — credentials are not included) |
- In the Session Manager, click Export next to a session — saves that saved session's archive.
- Or: Gear → Sessions → Export as… — exports the current unsaved state immediately.
Both open a file-save dialog and write a .tar.gz file.
Gear → Sessions → Load from… opens a file-pick dialog for .tar.gz / .tgz files.
On import:
- Local files from the archive are extracted to a temp directory
- File paths are updated to point to the extracted copies
- The session state is restored (SQL, history, pinned queries, notes)
- The Session Warning dialog appears if any issues are detected
TableViewer automatically saves the current state as a "last session" whenever you execute a query. On startup it restores this last session silently.
When loading a session (from the manager, from an archive, or from Spaces), TableViewer validates the state:
| Check | Warning |
|---|---|
| Local file path does not exist | "File not found: /path/to/file (alias: X)" |
| Unknown filetype | "Unknown filetype 'xyz' for alias 'X'" |
| Invalid jaq filter | "Invalid jaq filter for alias 'X': …" |
- Skip missing files — loads the session but removes entries whose files cannot be found
- Proceed anyway — loads the session as-is; DuckDB will error when you try to query missing files
interface SessionState {
files: Array<{
paths: string[] // local paths or remote URLs
alias: string // SQL table name
filetype: string // 'parquet' | 'csv' | 'json' | …
sep: string // CSV separator character
jaqFilter: string // jq filter string, '' or '.' = none
}>
sql: string // current SQL bar content
queryHistory: string[] // last ≤10 queries
pinnedQueries: PinnedQuery[] // { id, name, sql }
notes: Note[] // { id, title, content, created_at, updated_at }
}