public final class Lineage2Projector extends Object
CanonicalLineageModel comparison form shared with
SemanticIRProjector and DlineageXmlProjector (US-010).
Mapping rules:
EdgeRole.SELECT edges keyed by the
lower-cased target column as outputName. The contract role
(DIRECT/TRANSFORM/AGGREGATE/…) is preserved on
CanonicalLineageEdge.getSemanticRole() for the
DivergenceClass.ROLE_MISMATCH pass.EdgeRole.JOIN, every other
ROW-axis role (FILTER, and the R3 UNKNOWN fallback) maps to
EdgeRole.FILTER — the same bucket legacy fdr
projects into. The original role survives as the semanticRole.role: DERIVED edges have a null source by contract §4; they
contribute the target output name (so output-presence comparison
sees it) but no canonical edge.database.schema.object endpoint parts, lower-cased —
contract §4.1 promises physical endpoints arrive fully expanded.Identity, transformation, location, confidence, and diagnostic fields
are intentionally ignored: the canonical model compares lineage facts
only. A document with no parseable edges array is
ProjectorResult.UnsupportedReason.MALFORMED_CONTRACT_JSON; a valid
document with zero edges is
ProjectorResult.UnsupportedReason.NO_RELATIONSHIPS, mirroring the
dlineage projector's convention.
public static ProjectorResult project(String contractJson)
contractJson - one lineage2 contract document (the whole unit
output, §2), as produced by the engine's exporter