nodes.StageRefresh
What one refresh did to one node: how its state started (on the first
Usage
nodes.StageRefresh(
node,
report,
started=None,
write=None,
preconditions=list(),
retention=list(),
postconditions=list(),
route=None,
transform=None,
quarantine=list(),
quarantined=0,
quarantine_table=None,
held=None,
held_error=None
)refresh), what the batch was, and what its sink wrote. str() shows them in that order; summary() gives one line, unless the refresh did something notable.
Parameter Attributes
node: str-
The node’s name.
report: RefreshReport | None-
The batch: the source versions it went from and to, the changes, how they were applied and the preconditions checked on them. None on a first refresh that computed or resumed the state at the latest versions.
started: str | None = None-
“computed”, or “resumed from
@v<n>“, on the first refresh.
write: SinkWrite | None = Nonepreconditions: list[Discharged] = list()-
On the first refresh: how each precondition on the sources was established on the full tables (later batches:
report.preconditions). retention: list[RetentionReport] = list()-
For a node over a source with
arrives_within: its open time buckets, those dropped from its state after the write, and the bound. postconditions: list[Discharged] = list()-
On the first refresh: the postconditions the node’s transform did not prove and checks on its output (
on_unproved="check"), checked on the full result (later batches:report.postconditions). route: Route | None = None-
With
refresh(route=...): how the node’s proof reached the engine (D13), with its class; None without a route or a contract. transform: str | None = None-
For a stored node, the transform that made it, where its name differs from the node’s (the sink’s): the entry is headed
daily_revenue → daily:(#695). quarantine: list[QuarantineReport] = list()-
For each source with rows set aside (
on_violation="quarantine", #184): what this refresh set aside, released and deleted. quarantined: int = 0-
The rows of the node’s sources quarantined after the refresh, in all.
quarantine_table: str | None = None-
Where they are stored, if the node writes them to a table.
held: str | None = None-
Why the node did not take the batch (
on_violation="hold", or a condition no row rule covers), or “waiting for” when a stored node it reads has no state yet; None if it took it. held_error: Exception | None = None-
The PreconditionError that held it, with
.rows.
Attributes
| Name | Description |
|---|---|
| heading | How the entry is headed: the node, after the transform that made |
| notable | Why this entry deserves more than one line, or []: the first |
| outcome | “held” if the node did not take the batch, “quarantined” if rows |
heading
How the entry is headed: the node, after the transform that made
heading: str
it where the names differ.
notable
Why this entry deserves more than one line, or []: the first
notable: list[str]
refresh (how the state started and how the preconditions were established on the full tables), a source whose change could not be applied incrementally, a schema change, or a sink that replaced its table’s rows.
outcome
“held” if the node did not take the batch, “quarantined” if rows
outcome: str
of its sources are set aside, else “ok”.
Methods
| Name | Description |
|---|---|
| summary() | One line, for the log of a job that refreshes often: |
| to_dict() | The entry as JSON values (Refresh.to_json). |
summary()
One line, for the log of a job that refreshes often:
Usage
summary()“paid: changes from orders v3→v4 (change feed), requires checked on 2 row(s), merge v5: +2 −0”. With something notable, the full entry (str()) instead.
to_dict()
The entry as JSON values (Refresh.to_json).
Usage
to_dict()