How it fits
Freshet decides what to rebuild; your scheduler rebuilds it; state records what was built. Here is how the pieces connect.
Plan, run, commit
Freshet is a planner, not a scheduler. It reads your models and the last committed state, and answers one question: what must rebuild, and why. Something else runs the plan. Once that run succeeds, Freshet records it in state, so the next plan starts from there.
- The planner is the same code however you call it: the
freshetCLI, thefreshet-servedaemon, the Python package, or the C ABI. They all return the same plan. - The plan is JSON: models in order, why each one rebuilds, which partitions, and its cost.
With
--sqlit carries the statements for your warehouse too. - The runner is whatever you already have. Run it on your cluster shows each one.
- The commit happens only after the run succeeds. Nothing that hands off a plan,
freshet submitincluded, ever commits.
Through dagron
dagron takes a plan whole: dagron-state turns it into one run with a task per
model, wired from the plan's own edges, and each task runs your --command.
Self-hosted, you point freshet at your dagron and keep state in a file. On
dagron Cloud, one edge address and one token cover both: runs go to
your workspace, and state goes to hosted state.
| Self-hosted dagron | dagron Cloud | |
|---|---|---|
| Submit to | http://<your-dagron>:8080/api/state/plans/submit | https://<your-edge>/api/state/plans/submit |
| State | --state state.json: one writer at a time | --state https://<your-edge>/state/v1: any number of writers |
| Commit | last writer wins | compare-and-swap with --expect-version; exit 3 if another commit landed first |
| You run | dagron and its database | nothing: tasks run on your compute or on dagron's workers |
Other schedulers
Anything that can run a command in order can run a plan. Airflow gets it as a DAG through
freshet-airflow. A SQL client runs the --sql statements top to
bottom. Your own platform can call the daemon or the Python package and schedule the models
itself. They all follow the same rule: commit only after the run succeeds.