Skip to main content

nodes.Refresh

What a refresh did, node by node, upstream first: returned by

Usage

Source

nodes.Refresh(nodes)

Node.refresh and Group.refresh. str() shows each node’s entry; summary() one line per node, for a job that refreshes often; refresh["paid"] is the entry of the node named “paid”.

Attributes

nodes: list[StageRefresh]
One StageRefresh per node refreshed: the nodes asked for and the stored nodes they read, each once, upstream first.

Attributes

Name Description
notable Whether any node’s entry has something StageRefresh.notable.
outcome How the refresh ended, for a job’s exit code: “held” if a node
writes What each stored node’s sink wrote (sverify.io.SinkWrite),

notable

Whether any node’s entry has something StageRefresh.notable.

notable: bool


outcome

How the refresh ended, for a job’s exit code: “held” if a node

outcome: str

did not take its batch (on_violation="hold"), “quarantined” if rows of some node’s sources are set aside (on_violation="quarantine"), else “ok”. A refresh that fails raises instead.


writes

What each stored node’s sink wrote (sverify.io.SinkWrite),

writes: list[SinkWrite]

upstream first.

Methods

Name Description
alert() A short Markdown text for whoever is on call, when the outcome is
summary() One line per node (StageRefresh.summary), upstream first; a node
to_dict() The refresh as JSON values: its format, outcome and one entry
to_json() to_dict as JSON, for a CLI or a scheduled job.

alert()

A short Markdown text for whoever is on call, when the outcome is

Usage

Source

alert()

not “ok”: per node, what broke, how many rows, a few examples, where the rows are, and what to do. None when there is nothing to say.

A scheduled job posts it, for example as a GitHub issue (#771).


summary()

One line per node (StageRefresh.summary), upstream first; a node

Usage

Source

summary()

whose refresh did something notable (its first refresh, a recompute, a schema change, an overwrite) gets its full entry.

Returns
str

The summary, such as “paid: changes from orders v3→v4 (change

feed), requires checked on 2 row(s), merge v5: +2 −0”.

to_dict()

The refresh as JSON values: its format, outcome and one entry

Usage

Source

to_dict()

per node (StageRefresh.to_dict).


to_json()

to_dict as JSON, for a CLI or a scheduled job.

Usage

Source

to_json()