group()
Several nodes to refresh together, against the same source versions:
Usage
group(*nodes)sv.group(a, b).refresh(). A stored node they share is refreshed and written once; .status() reports on each.
Parameters
*nodes: Node- The nodes to refresh together: results of transforms, stored or not (not sources).
Returns
Raises
TypeError- No nodes are given, or one is not a node (a source, or an Ibis table).
Examples
Two outputs that read the same stored node, with p and r from the Node example:
@sv.transform()
def customers(t):
return t.select(t.customer)
g = sv.group(r, p.pipe(customers)) # fan-out: p is piped twice
result = g.refresh() # paid is refreshed and written once
[s.node for s in result.nodes] # ['paid', 'doubled', 'customers']
print(g.status()) # one line per node