Read from Data Store: <DataStoreName>

Data Store
Read from Data Store: <DataStoreName>
Found
Key
Not found
Value(model)
Last updated

Description

Reads one entry of a Data Store by key. If the key exists the Found pin runs with the entry's value and when it was last written; if not, the Not found pin runs. The value is typed by the Data Store: a single model, a list of models, or a map of key to model.

When to use

Use Read from Data Store to bring something a pipeline stored earlier back into a run: a cursor for an incremental import, the last order number seen, a cache of a slow lookup, a list of ids already processed. The pins come from the Data Store the node is bound to, and the Value output is typed by the model the store declares, so wire it into a Break node to read its fields.

A missing key is an ordinary outcome, not an error: the node continues on Not found. Flovello has no “read or compute” node, so the idiom is explicit: wire Not found to the nodes that work the value out, end that branch in a Write to Data Store node for the same key, and continue from there. A read is one database round trip, which is why the node sits on the execution flow instead of being evaluated lazily like a variable read.

If the model was edited after the entry was written, the entry is still read: fields the model no longer has are dropped and new ones take their defaults, and the execution log names the fields that differed.

Data Store is not available on the Experimental plan. The node fails the run with a message saying so. It works in pipelines only, not in functions.

Pins

Input pins

Pin Type Default Notes
Key string — The key of the entry to read, 1 to 512 characters. Keys are exact: `order-17` and `Order-17` are different entries.

Output pins

Pin Type Notes
Value model The stored value, in the shape the Data Store declares. Empty on the Not found pin, so only use it from the Found branch.
Last updated datetime When the entry was last written. Empty on the Not found pin.

Execution pins

Pin Direction
In Input
Found Output
Not found Output

Example

An hourly pipeline polls a supplier API. Read from Data Store: Sync state looks up the key last-sync. On Found it breaks the SyncState model and asks the API only for changes after its since field. On Not found it takes a default start date instead. Either way, the run ends with Write to Data Store: Sync state, storing the new since under last-sync for the next run.

See also