AshR2RML.Reactor.Pipeline (AshR2RML v26.8.22)

Copy Markdown View Source

Full end-to-end Zach Daniel–style Reactor pipeline exercising every public facet of AshR2RML through 6 named, module-backed steps:

  1. compile_resources — compile Ash resource modules into a normalized AshR2RML.Mapping.Bundle (AshR2RML.Reactor.Steps.CompileResources). 2a. verify_alignment — fail-closed schema alignment verification (AshR2RML.Reactor.Steps.VerifyAlignment), runs concurrently with 2b. 2b. evaluate_differential — optional SPARQL behavioral parity evaluation (AshR2RML.Reactor.Steps.EvaluateDifferential), runs concurrently with 2a.
  2. attach_provenance — attach W3C PROV-O prov:generatedAtTime and prov:wasDerivedFrom predicate-object maps after alignment clears (AshR2RML.Reactor.Steps.AttachProvenance).
  3. apply_policy — actor-scoped Ash policy filtering (nil-safe) (AshR2RML.Reactor.Steps.ApplyPolicy).
  4. render_r2rml_turtle — render final W3C R2RML Turtle string (AshR2RML.Reactor.Steps.RenderTurtle).

Returns the final W3C R2RML Turtle string.

Inputs

  • :resources — a single Ash resource module or a list of modules.
  • :actor — optional actor map for policy-based projection filtering.
  • :observations — optional list of %AshR2RML.SPARQL.Observation{} structs
                  (>= 2 required for the differential step to be active).
  • :metadata — optional map forwarded to the differential evaluator.

Example

Reactor.run(AshR2RML.Reactor.Pipeline, %{
  resources: [MyApp.User, MyApp.Org],
  actor: %{id: "alice", role: :admin},
  observations: [],
  metadata: %{}
})