The Virtuoso Conductor can be used for importing existing R2RML scripts into Virtuoso and generate the necessary RDF Linked Data Views for Virtuoso hosting and deployment.
Ensure the following VAD packages are installed:
SQL> CREATE TABLE "R2RML"."TEST"."PRODUCT" ( "id" INTEGER, "name" VARCHAR(100), PRIMARY KEY ("id") ); Done. -- 16 msec. SQL> INSERT SOFT "R2RML"."TEST"."PRODUCT" VALUES(1, 'Virtuoso'); Done. -- 0 msec. SQL> INSERT SOFT "R2RML"."TEST"."PRODUCT" VALUES(2, 'UDA'); Done. -- 0 msec. SQL>
SQL> GRANT SELECT ON R2RML.TEST.PRODUCT TO "SPARQL",?"SPARQL_UPDATE" Done. -- 1 msec. SQL>
$ cat demo.n3 @prefix rr: <http://www.w3.org/ns/r2rml#> . @prefix exa: <http://example.com/ns#> . @prefix product: <http://example.com/product#> . <http://example.com/ns#TriplesMap1> a rr:TriplesMap; rr:logicalTable [ rr:tableSchema "R2RML"; rr:tableOwner "TEST"; rr:tableName "PRODUCT" ]; rr:subjectMap [ rr:template "http://example.com/product/{id}"; rr:class exa:product; ]; rr:predicateObjectMap [ rr:predicate product:id; rr:objectMap [ rr:column "id" ]; ]; rr:predicateObjectMap [ rr:predicate product:name; rr:objectMap [ rr:column "name" ]; ]; . $
Linked Data -> R2RML of the Virtuoso Conductor:
Choose File button and select the R2RML file to load:
Validate button to verify the R2RML mapping script:
Generate button to generate the RDF Linked Data Views mappings for the R2RML mapping script:
Execute button to create the RDF Linked Data Views mapping the the Quad Store:
Default Graph Name (transient) specified http://demo.openlinksw.com/r2rml# can now be used to run a SPARQL query against the created Linked Data View.
If the Generate RDB2RDF triggers and Enable Data Syncs with Physical Quad Store check boxes are selected the Physical Graph Name (persistent) specified urn:demo.openlinksw.com/r2rml# can be used to run a SPARQL query against the materialized triples in the Quad Store.