join
join enriches one table with another. The left input is the anchor, especially for how: left; the right input supplies matching columns.
Use one join for one relationship. If the explanation has to say “and then it also joins…”, chain another join so the row-count effect stays inspectable.
Join contract
Section titled “Join contract”| Field | Required | Notes |
|---|---|---|
inputs | yes | Exactly two upstream tables: left first, right second. |
leftKey | yes | Bare column name or expression evaluated on the left table. |
rightKey | yes | Bare column name or expression evaluated on the right table. |
how | no | inner by default; left keeps all left rows. |
Before you join
Section titled “Before you join”- Choose
innerwhen unmatched rows should disappear. Chooseleftwhen the left table defines the cohort. - Watch many-to-many relationships. Rime allows them, but they create one output row for every matching pair.
- If keys need normalization, an upstream
derivenode often makes the matching logic easier to review than expression keys inside the join.
Result shape
Section titled “Result shape”default is the joined table. Right-side column names are suffixed when needed to avoid collisions.
The editor/report should make left-vs-right order and row-count expansion visible.
Example
Section titled “Example”- id: enriched kind: join inputs: [orders, customers] # length 2 leftKey: customer_id rightKey: id how: left # inner | left, default innerRelated
Section titled “Related”- derive - normalize keys before joining
- Expression language - expression join keys