graflo.architecture.contract.ingestion.steps.references¶
Pipeline steps for a record that is one vertex and refers to others.
Attributes¶
Reference = tuple[str, str, Mapping[str, str]] | tuple[str, str, Mapping[str, str], str]
module-attribute
¶
Functions:¶
subject_role(relations)
¶
A role for the subject vertex that no relation is named like.
subject_with_references(vertex, references)
¶
Steps that read a record as vertex plus an edge per reference.
The subject and the targets of each relation are kept in their own role, and every edge names both. So an edge joins the subject to the targets of its own relation: a target of the subject's type is not read as a second subject, and two relations to one type do not take each other's targets.
Every edge of the record is written by a step, so a resource built from
these steps sets infer_edges=False.