API reference
The orca package, from Orca 0.3.2, as published on mojoshelf (commit 1db5de9aab67), by mojo doc from Mojo 1.2.0.
Source.
orca: orchestration for Mojo data pipelines.
Declare steps and the pipeline they make, and give the binary orca's command line:
from dista import Seq
from orca import Ctx, Gather, Mapped, Month, Pipeline, Step, orca_main
def size(mut ctx: Ctx, m: Month) raises -> Int:
return m.month * 100
def total(mut ctx: Ctx, sizes: Seq[Int]) raises -> Int:
var t = 0
for i in range(len(sizes)):
t += sizes[i]
return t
comptime Size = Step["size", Month, Int, size, Mapped]
comptime Total = Step["total", Seq[Int], Int, total, Gather, after=Size]
comptime Sizes = Pipeline["sizes", Size, Total]
def main() raises:
orca_main[Sizes]()
See DESIGN.md for how it works and where it's going.
Modules
-
orca.actionsWhatorca uidoes to runs: each action is rows in Postgres that the scheduler, or the run's own process, acts on. 1 struct · 8 functions -
orca.authWho may act inorca ui: users with passwords, their sessions, and a record of what each did. 10 functions -
orca.awsorca aws: a project's orca on AWS, with theawsanddockercommands its user already has (aws login, orAWS_PROFILEfor a named profile). 1 function -
orca.aws_assetsThe stack template and the project Dockerfileorca awswrites out: deploy/aws/orca.yaml and deploy/project.Dockerfile, embedded by scripts/embed-aws.py. Edit those, then run it;pixi run test-aws-assetsfails while this is out of date. -
orca.awsec2The few EC2 calls theec2runner makes (orca.ec2), over objectstore's SigV4 signing and HTTP. 2 structs · 1 function -
orca.chartRuns per day, drawn as SVG on the server for the home page: one bar a day, stacked by how the runs ended. 1 struct · 1 function -
orca.civilCalendar arithmetic: dates to days since 1970-01-01 and back. 1 struct · 4 functions -
orca.cliorca_main: the command line every pipeline binary gets. 3 functions -
orca.commandTheorcacommand: the scheduler, the UI and registration, in a binary that links no pipeline. A project builds its own from two lines: 1 function -
orca.cronCron expressions, and when they next fire in a time zone. 1 struct -
orca.ctxCtx: what a step gets besides its input. 3 structs -
orca.dagA pipeline's DAG drawn as SVG, on the server. 1 struct · 2 functions -
orca.dayDay: the partition key of a daily pipeline. 1 struct -
orca.ec2Runs on EC2: a head instance and worker instances per run, started and ended by the scheduler (DESIGN.md, phase 5, PR 5). 2 structs · 1 function -
orca.graphA directed graph drawn as SVG, on the server: the pipelines and datasets that feed each other, and a snapshot's lineage. 2 structs · 1 function -
orca.heartbeatA run's heartbeat, kept fresh from a thread while the run's steps work. 1 struct · 2 functions -
orca.htmlWriting HTML: every value escaped, markup only where it's said to be. 1 struct · 3 functions -
orca.jsonThe little JSON orca writes: quoted strings. 1 function -
orca.keyKey: what a partition key is, whatever it counts. 2 traits · 1 function -
orca.keyedKeyed partitions: keys that are names, read from a column of a dataset. 1 struct -
orca.kubeRuns on Kubernetes: a dista cluster per run, made and removed by the scheduler (K8S.md). 2 structs · 1 function -
orca.lineageLineage: which snapshots a dataset's snapshot was made from, and what was made from it, from the reads and commits every attempt records. 5 structs · 6 functions -
orca.locateWhere a pipeline's step functions and dista tasks are defined in its source, soorca uican link each one to its line at the commit a run ran. 3 functions -
orca.logsWhere attempts' logs, drivers' logs and runs' timelines go. 12 functions -
orca.monthMonth: the partition key of a monthly pipeline. 1 struct · 2 functions -
orca.nameName: the partition key of a keyed pipeline (orca.keyed). 1 struct · 3 functions -
orca.partitionsPartition sets: which keys a pipeline is partitioned by, from when. 2 structs · 1 trait · 1 function -
orca.pipelinePipelines: a named list of steps, checked and run in order. 3 structs -
orca.procStarting processes: what the scheduler needs to run pipeline binaries. 4 functions -
orca.scheduleSchedules: when a pipeline runs by itself, and which partition it fills. 4 structs · 1 trait -
orca.schedulerThe scheduler: fires schedules, senses datasets, queues backfills and rebuilds, and starts runs. 2 structs · 9 functions -
orca.secretsSecrets a pipeline's runs get:orca register --secret NAME=ID. 3 functions -
orca.sensorsRuns started by datasets: sensors, and rebuilds downstream of a dataset. 2 structs · 8 functions -
orca.sourceWhere a pipeline binary's code came from: its git repository and commit, given at build time. 6 functions -
orca.stateorca's state in Postgres: pipelines, runs, steps and attempts. 4 structs · 1 function -
orca.stepSteps: the functions a pipeline runs, and the edges between them. 3 structs · 1 trait -
orca.storeWhere the executor records what it does. 1 struct · 1 trait -
orca.tablesIceberg tables from steps: pinned reads, and commits a retry recognises. 9 functions -
orca.tasksThe dista tasks a pipeline's steps call, and the runtime a run gets. 2 structs · 1 trait · 3 functions -
orca.timelineA run's Dista timeline and its workers over time, drawn as SVG on the server for the run's page. 2 structs · 3 functions -
orca.tzTime zones, from the system's TZif files (RFC 8536). 2 structs -
orca.uiorca ui: pipelines and runs as web pages, and the same as JSON. 13 structs · 18 functions -
orca.ui_styleThe stylesheetorca uiserves at/static/orca.css: magmalake.dev's colours and type, light and dark, and system fonts (nothing is fetched). -
orca.warehouseA dataset's current snapshot, read from its table's metadata file without iceberg, for<binary> sense. 1 struct · 2 functions