Skip to content

lineage

etl_craft.engine.repository.lineage

Column lineage stored per SQL task, in AUD_COLUMN_LINEAGE.

SqlTaskRef dataclass

An active SQL task of an active pipeline.

StoredEdge dataclass

One target column and one column it is made from; no source for a constant or a count.

fetch_sql_tasks

fetch_sql_tasks(conn: Connection) -> list[SqlTaskRef]

Return every active SQL task, by pipeline and task code.

fetch_task_lineage

fetch_task_lineage(conn: Connection, task_id: int, source_sql_hash: str) -> list[StoredEdge]

Return the lineage stored for task_id from the SELECT hashed source_sql_hash.

store_task_lineage

store_task_lineage(conn: Connection, task_id: int, source_sql_hash: str, edges: Sequence[StoredEdge]) -> None

Replace the lineage stored for task_id.