Skip to content

Creating Prov output

Ashish Gehani edited this page Apr 13, 2016 · 10 revisions

SPADE includes support for sending all provenance metadata from its kernel to a single file in W3C PROV-N or W3C PROV-O format.

To do this, add the Prov storage before sending provenance metadata (by adding a SPADE reporter). The output file's extension determines whether the serialization will be in PROV-N or PROV-O format.

For output in PROV-N format, to a file named /tmp/provenance, use the .provn extension:

-> add storage Prov output=/tmp/provenance.provn

Adding storage Prov... done

For output in PROV-O format, to a file named /tmp/provenance, use the .ttl extension:

-> add storage Prov output=/tmp/provenance.ttl

Adding storage Prov... done

At this point, PROV metadata sent to the kernel will result in corresponding elements in the /tmp/provenance.provn or /tmp/provenance.ttl file. (Note that the file will be overwritten if it already existed.)


To specify that a SPADE reporter's annotation keys are drawn from a particular namespace, the prefix and RDF schema can be provided. For example, the namespace prefix audit can be defined to correspond to the RDF schema http://spade.csl.sri.com/rdf/audit.rdfs:

add storage Prov output=/tmp/provenance.ttl audit=http://spade.csl.sri.com/rdf/audit.rdfs

Adding storage Prov... done

Note: The namespace prefixes prov and data are reserved and cannot be specified.


To stop further provenance metadata from being sent to the file, the Prov storage can be removed:

-> remove storage Prov
Shutting down storage Prov... done

Note: Only PROV elements are emitted. To translate OPM into a PROV embedding, use the OPM2Prov filter:

add filter OPM2Prov position=1

Adding filter OPM2Prov... done
Clone this wiki locally