## nodes.Refresh


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


Usage

``` python
nodes.Refresh(nodes)
```


[Node.refresh](Node.refresh.md#sverify.Node.refresh) and [Group.refresh](nodes.Group.md#sverify.nodes.Group.refresh). `str()` shows each node's entry; [summary()](cli.summary.md#sverify.cli.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](nodes.StageRefresh.md#sverify.nodes.StageRefresh) per node refreshed: the nodes asked for and the stored nodes they read, each once, upstream first.


## Attributes

| Name | Description |
|----|----|
| [notable](#notable) | Whether any node's entry has something [StageRefresh.notable](nodes.StageRefresh.md#sverify.nodes.StageRefresh.notable). |
| [outcome](#outcome) | How the refresh ended, for a job's exit code: "held" if a node |
| [writes](#writes) | What each stored node's sink wrote ([sverify.io.SinkWrite](io.SinkWrite.md#sverify.io.SinkWrite)), |

------------------------------------------------------------------------


#### notable


Whether any node's entry has something [StageRefresh.notable](nodes.StageRefresh.md#sverify.nodes.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](io.SinkWrite.md#sverify.io.SinkWrite)),


`writes: list[SinkWrite]`


upstream first.


## Methods

| Name | Description |
|----|----|
| [alert()](#alert) | A short Markdown text for whoever is on call, when the outcome is |
| [summary()](#summary) | One line per node ([StageRefresh.summary](nodes.StageRefresh.md#sverify.nodes.StageRefresh.summary)), upstream first; a node |
| [to_dict()](#to_dict) | The refresh as JSON values: its format, [outcome](nodes.Refresh.md#sverify.nodes.Refresh.outcome) and one entry |
| [to_json()](#to_json) | [to_dict](nodes.Refresh.md#sverify.nodes.Refresh.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

``` python
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](nodes.StageRefresh.md#sverify.nodes.StageRefresh.summary)), upstream first; a node


Usage

``` python
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](nodes.Refresh.md#sverify.nodes.Refresh.outcome) and one entry


Usage

``` python
to_dict()
```


per node ([StageRefresh.to_dict](nodes.StageRefresh.md#sverify.nodes.StageRefresh.to_dict)).


------------------------------------------------------------------------


#### to_json()


[to_dict](nodes.Refresh.md#sverify.nodes.Refresh.to_dict) as JSON, for a CLI or a scheduled job.


Usage

``` python
to_json()
```
