Saved-data queries#

pipewhy.query.integrity_query(result, *, registry=None, impact_result=None, limit=1000, cursor=None, start_limit=1000)#

Count the full captured comparison scope, independently of metric pagination.

Registry counts select matching snapshot pairs, namespace, scope, fingerprint policies and represented artifact IDs. They count evidence observations and their touched episodes, never proven physical corruption events.

Parameters:
  • result (ComparisonResult)

  • registry (IncidentRegistry | None)

  • impact_result (ImpactResult | None)

  • limit (int)

  • cursor (str | None)

  • start_limit (int)

Return type:

IntegrityPage

pipewhy.query.impact_query(result, *, catalog=None, limit=1000, cursor=None, max_label_bytes=1048576, start_limit=1000)#

Select trusted L1 impact output, already scoped by explicit starts/relations.

Observation availability means the comparison input was supplied. Its unknown and incomparable statuses still apply, independently of graph reachability.

Parameters:
  • result (ImpactResult)

  • catalog (ArtifactCatalog | None)

  • limit (int)

  • cursor (str | None)

  • max_label_bytes (int)

  • start_limit (int)

Return type:

ImpactPage

pipewhy.query.incident_query(registry, selector=None, *, view=IncidentView.EPISODES, limit=1000, cursor=None, event_limit=1000, max_key_bytes=1048576, sources=(), support_limit=1000)#

Inspect grouping and exact references; registry state alone is not an explanation.

Episode pages include a bounded related observation prefix. The observations view independently pages every reference, including long-running episodes. Explicit sources attach selected captured analyses; missing sources remain unavailable. support_limit bounds related check links across the whole page.

Parameters:
  • registry (IncidentRegistry)

  • selector (IncidentFilter | None)

  • view (IncidentView | str)

  • limit (int)

  • cursor (str | None)

  • event_limit (int)

  • max_key_bytes (int)

  • sources (tuple[IncidentObservations, ...])

  • support_limit (int)

Return type:

IncidentPage

pipewhy.query.lineage_query(index, selector, *, direction=Direction.FORWARD, depth=1, relations=(Relation.COPY, Relation.TRANSFORM, Relation.DERIVED), catalog=None, evidence=(), limit=1000, cursor=None, max_label_bytes=1048576)#

Select explicit edges by minimum-hop depth; missing payloads stay unavailable.

Supplied evidence availability describes captured payload presence, never proof of an operation or equality. Containment and time order are not inferred.

Parameters:
  • index (LineageIndex)

  • selector (ArtifactSelector)

  • direction (Direction | str)

  • depth (int | None)

  • relations (Iterable[Relation | int])

  • catalog (ArtifactCatalog | None)

  • evidence (tuple[Evidence, ...])

  • limit (int)

  • cursor (str | None)

  • max_label_bytes (int)

Return type:

LineagePage

pipewhy.query.diff_query(result, selector=None, *, catalog=None, limit=1000, cursor=None, max_label_bytes=1048576, resolution=None)#

Inspect trusted C6 producer output; optional names bind an explicit endpoint.

Stable IDs select comparison rows, including removed artifacts, independently of the chosen name catalog. Names/paths select only within that captured catalog. Missing names do not erase captured comparison facts or become current reads.

Parameters:
  • result (ComparisonResult)

  • selector (ArtifactSelector | None)

  • catalog (ArtifactCatalog | None)

  • limit (int)

  • cursor (str | None)

  • max_label_bytes (int)

  • resolution (str | None)

Return type:

DiffPage

pipewhy.query.snapshot_query(catalog, selector=None, *, limit=1000, cursor=None, max_label_bytes=1048576)#

Page the captured artifact inventory; retained resolution stays in metadata.

This view does not fetch or invent record/value payloads. Original captured name IDs remain unchanged; only names referenced by returned rows are expanded.

Parameters:
Return type:

SnapshotPage

class pipewhy.query.ArtifactCatalog(metadata, columns, labels, *, discovery_complete)#

Bind C1 names/containment to one snapshot; artifact aliases stay stable.

Name dictionary state is copied and owned. Outside-scope parents remain explicit and restrict full-path claims, while captured stable IDs can still resolve.

Parameters:
  • metadata (SnapshotMetadata)

  • columns (Mapping[str, Buffer])

  • labels (tuple[Buffer, Buffer, Buffer])

  • discovery_complete (bool)

class pipewhy.query.ArtifactSelector(artifact_id: int | None = None, name: str | None = None, path: tuple[str, ...] | None = None)#
Parameters:
  • artifact_id (int | None)

  • name (str | None)

  • path (tuple[str, ...] | None)