helix_ir.lineage

helix_ir.lineage — data lineage tracking.

class helix_ir.lineage.Lineage[source]

Bases: object

A lineage graph tracking field-level data flow.

record(source: Path | str, target: Path | str, transform: str | None = None, confidence: float = 1.0) None[source]

Record a lineage edge from source to target.

upstream(path: Path | str) list[LineageEdge][source]

Return all edges where target == path.

downstream(path: Path | str) list[LineageEdge][source]

Return all edges where source == path.

all_edges() list[LineageEdge][source]

Return all recorded edges.

to_openlineage() list[dict][source]

Export lineage as OpenLineage-compatible dicts.

to_dot() str[source]

Export lineage as a Graphviz DOT string.

class helix_ir.lineage.LineageEdge(source: Path, target: Path, transform: str | None = None, confidence: float = 1.0)[source]

Bases: object

A directed edge in the lineage graph.

source: Path
target: Path
transform: str | None = None
confidence: float = 1.0