CLI Reference
logged-state
Inspect and correct the run log of Python tables with state="logged".
sqlload logged-state show [SELECT ...]sqlload logged-state verify [SELECT ...]sqlload logged-state reconcile [SELECT ...] [--yes]sqlload logged-state reset SELECT ... (--to VALUE | --clear) [--yes]sqlload logged-state shows and corrects the position of Python tables with state="logged":
tables that keep a position the data can’t carry, such as an API sync token, in an append-only run
log. Most projects never use it, because tables with a cursor_column find their position in the
loaded data. See Logged state.
| Command | Does |
|---|---|
show |
Prints each logged table’s run log and current state. Read-only. |
verify |
Compares each table’s logged cursor with the data. Read-only; exits 1 when they disagree. |
reconcile |
Appends a reconciliation that adopts the data’s position where the log disagrees. |
reset --to VALUE |
Appends a reset: the next run reads from VALUE. On a table with a cursor_column, VALUE is a cursor value and ctx.state is kept; otherwise it’s the ctx.state value as JSON. |
reset --clear |
Appends a reset that forgets the position, cursor and ctx.state both: the next run reads from the beginning (cursor_start, or everything). |
Options
Section titled “Options”| Option | Meaning |
|---|---|
SELECT ... |
Sources or tables to select. All logged tables when none is given; reset needs them named. |
--yes |
reconcile and reset: append the events. Without it, they only show what they would append. |
--to <TO> |
reset only: the position to read from next. |
--clear |
reset only: forget the position. Give --to or --clear, not both. |
Nothing is ever deleted from the log.
$ sqlload logged-state showraw.shop__events state 4 (run 54ab366a-bca1-4088-9723-4c6d1723ad02 at 2026-11-09T18:02:47.844103Z) 2026-11-09T18:02:47.552256Z e1bf5051-3333-4fdd-aa31-18bf2d74a51c run - -> -, state 2 6 rows 2026-11-09T18:02:47.844103Z 54ab366a-bca1-4088-9723-4c6d1723ad02 run - -> -, state 4 6 rows$ sqlload logged-state verifyraw.shop__events ok state 4 (run 54ab366a-bca1-4088-9723-4c6d1723ad02 at 2026-11-09T18:02:47.844103Z)$ sqlload logged-state reset shop__events --to 0would append raw.shop__events reset - -> -, state 0 (add --yes to append it)A record SQLLoad can’t read, because it’s corrupt or written by a newer version, blocks only its
own table. logged-state show lists it, and a reset ... --yes starts a new position after it.
load --reload also starts a logged table over.