Skip to content
Sandadocs

Stream graphs

Pull, model, push. A stream graph rebuilds what a pull feeds as soon as its rows land, then sends the result out with your pushes, on the pull's clock alone.

A stream graph joins three things you already have, and runs them in order every time a pull lands rows:

  1. Pull. A pull reads new and changed records into your warehouse.
  2. Model. A task rebuilds the views and tables those records feed.
  3. Push. Your pushes send the result to the systems your team works in, such as Salesforce or a Postgres database.

Without a graph, each of the three keeps its own schedule, and a number can go out before the rows it is built on have been modelled. With one, the modelling starts as soon as the rows land, and the pushes start only once it has succeeded. A half-built number never leaves.

One clock

A graph runs on its pull's schedule and no other. The task and the pushes in it have no schedule of their own: the graph starts them, every time the pull lands rows.

So saving a graph switches off the clocks its task and pushes kept by themselves: a task's schedule and the sync it ran after, a push's schedule and the sync or pull it ran after. The save says which it switched off, such as "“sales by product to Postgres” ran every 15 minutes and after Factory landed. Its own clock is off now: the graph sends it once “factory sales by product” has modelled what “Factory” lands." The editor says the same under each stage before you save.

While a task or a push is in a graph, it can't be given a schedule of its own. Its editor says which graph runs it, after which pull, and links to the graph. To give it a schedule, take it out of the graph first. A task or push you take out of a graph, or one left when you delete a graph, keeps no schedule, so it runs only by hand until you give it one, and the save says so.

A graph saved before graphs took their stages' clocks over may still have a task or a push that runs by itself too. Its page says which, and Hand their clocks to the graph saves it again, which switches them off.

Where graphs are

Stream graphs are on Data · Streams · Graphs, under Your stream graphs, each with how its last pass went. The other parts of Streams are Overview, Pull and Push. The overview draws every graph as its three stages with how its last pass went, and opening one there lands on its page here.

Under Ready to join, owners and admins see each pull whose landing already starts a push with no graph between them (a push set to run after that pull lands). Such a push sends the rows as they landed, before anything is rebuilt. Make it a graph opens the editor filled in from them.

A graph also shows where its stages are:

  • A pull's page has When it lands: the graphs its landing starts, and the pushes that run straight after it, each with a way to put it in a graph.
  • A push's page says, under Runs, which graph sends it. A push that runs straight after a pull lands has Make a stream graph under What it does.
  • A task's page under Modelling · Tasks says which graph runs it, and its editor offers Make a stream graph where its schedule is chosen.

Make a stream graph

You need a pull first: its landing starts the graph. Only owners and admins make or change a graph. A stream in the CRM is the CRM's own and runs from there, so the editor never offers one as a pull.

  1. Start it. On Data · Streams · Graphs, press New stream graph, at the right of Your stream graphs, or Make it a graph beside a pull under Ready to join. Make a stream graph on a pull's, a push's or a task's page starts it from that stage.
  2. Check the pull. The editor draws the graph left to right: 1 · Pull, 2 · Model and 3 · Push, joined by lines that light up as each stage is chosen. Under 1 · Pull, it opens on the pull you started from, or the first one with pushes waiting on it. It says how often the pull runs, which is the graph's one clock.
  3. Check what it models with. Under 2 · Model, choose a task of the warehouse the pull lands in. When the warehouse has one task, or one whose name and steps match the pull and the pushes better than any other, the editor chooses it and says why. Choose Straight through: send what landed to send without modelling.
  4. Check what it sends. Under 3 · Push, the pushes already set to run after the pull are ticked. Tick or untick the ones it starts once the modelling succeeds. A graph can also send nothing, and only model what lands.
  5. Name it. The editor names the graph for where its rows end up, such as "Factory to Postgres", until you type your own. What it is for is optional.
  6. Press Save graph. The graph's page opens, saying which clocks it took over. It runs the next time its pull lands rows, or now, with Run now on its page.

A new stream graph: the Factory pull, the task that rebuilds sales by product, and the push to Postgres it sends, each a stage of the drawing with what saving switches off under it.
The editor opened from a push that already ran after its pull, with the task it suggested.

A graph models, sends, or both: one with neither is refused.

What happens each time

When a run of the pull lands rows, each of its graphs makes a pass:

  • The task runs at once, started by the landing, and recorded with its other runs under Modelling · Tasks.
  • If the modelling succeeded, each push starts, and sends only what changed, as it always does. Each one's run says it was started by the stream graph.
  • If it didn't, nothing is sent. The pass says why, and the next landing models and sends.

A run of the pull that finds nothing new lands nothing, and no pass is made.

A pass is held, and sends nothing, when its task is paused, has been deleted, or is already running. A push that can't run this time (paused, its credential to connect again, past what your edition runs, or still running from before) is passed over, and the pass says which.

A graph's page

Open a graph to see its three stages, Pull, Model and Push, with each one's name and mark, and its Passes: the last thirty, newest first. While a pass runs, the stage it is in is outlined and the line into it carries the pass along, here and on the overview; the stage stays outlined while its pushes are still writing. With nothing running, the stages are still. Each pass says what happened, such as "188 rows landed, modelled, then started 1 push.", with how the modelling went and each push's run.

A stream graph's page: its Pull, Model and Push stages, then its passes, one of them held because the task was already running.
A stream graph that lands a shop's orders, refreshes revenue and sends it to Salesforce.

Pass What it means
running The modelling or the sending is under way
succeeded The modelling succeeded, and the pushes were started
held It modelled or sent nothing, and says why: the task was paused, deleted or already running, or the modelling didn't succeed
failed Sanda couldn't finish the pass. The pull's run still landed what it landed
  • Run now runs the pull. When it lands rows, the graph models and sends as it would on a schedule.
  • Pause stops the graph: a landing starts nothing until it is resumed. The pull keeps its schedule. The task and the pushes have no clocks of their own, so they wait with the graph.
  • Edit changes any of its three stages.
  • Delete graph, at the foot of the page, stops it joining its streams. The pull keeps its schedule, and the passes stay on record. The task and the pushes stay as they are, with no schedule of their own, and the delete says which nothing will start now.

A task a graph models with can't be deleted while the graph uses it, because the graph would then send the pull's rows unmodelled. Choose another task on the graph first, or pause the task.

With Sam or an agent

Sam can make and change a graph for you. Ask it to run a task after a pull lands, or to send what a task rebuilt, and it builds the task, then joins the pull, the task and the pushes in a graph. Sam can't make a push: make one on Data · Streams · Push, and Sam joins it. Making or changing a graph always asks you first, whatever Sam's mode, because it decides when your pushes write to other systems. See what Sam can do.

An agent connected over MCP does the same with create_stream_graph and update_stream_graph, with the streams:manage permission. See the MCP tool reference.

What a graph costs

A graph costs nothing of its own. Its pull's runs and its pushes' runs are billed as any stream's are (see what streams cost), and its modelling is billed as the task's compute, as when the task runs on its own schedule. A task or push that no longer runs on a clock of its own beside the graph runs no more often than its pull lands rows.

Something unclear or out of date? Tell us, and we will fix the page.