%META:TOPICPARENT{name="VirtR2RML"}%
---+Virtuoso Conductor R2RML Import Wizard
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.
---++Usage Example
---+++Prerequisites
Ensure the following VAD packages are installed:
* [[https://virtuoso.openlinksw.com/download/][rdb2rdf_dav.vad]] R2RML package;
* [[https://virtuoso.openlinksw.com/download/][conductor_dav.vad]] Conductor package.
---+++Steps
1 Create a test table with sample data:
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>
1 Grant select privileges on the "R2RML"."TEST"."PRODUCT" table to the SPARQL user to enable execution via SPARQL endpoint:
SQL> GRANT SELECT ON R2RML.TEST.PRODUCT TO "SPARQL",?"SPARQL_UPDATE"
Done. -- 1 msec.
SQL>
1 Create the following R2RML mapping script for the "R2RML"."TEST"."PRODUCT" table:
$ cat demo.n3
@prefix rr: .
@prefix exa: .
@prefix product: .
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" ];
];
.
$
1 Go to the Linked Data -> R2RML
of the Virtuoso Conductor:
%BR%%BR%
%BR%%BR%
1 Select the Choose File
button and select the R2RML file to load:
%BR%%BR%
%BR%%BR%
1 Select the Validate
button to verify the R2RML mapping script:
%BR%%BR%
%BR%%BR%
1 Select the Generate
button to generate the RDF Linked Data Views mappings for the R2RML mapping script:
%BR%%BR%
%BR%%BR%
1 Select the Execute
button to create the RDF Linked Data Views mapping the the Quad Store:
%BR%%BR%
%BR%%BR%
1 The RDF Linked Data View creation is complete and status is displayed:
%BR%%BR%
%BR%%BR%
1 The 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 [[http://docs.openlinksw.com/virtuoso/rdfperformancetuning.html#rdb2rdftriggers][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.
%BR%%BR%
%BR%%BR%
1 The results set for the Linked Data View graph are displayed:
%BR%%BR%
%BR%%BR%
---++Related
* [[VirtR2RML][Virtuoso R2RML Support]]
* [[VirtGenerateR2RMLLinkedDataView][Generate Linked Data Views via R2RML from iSQL]]
* [[VirtTipsAndTricksGuideConductorR2RML][Generate Transient and/or Persistent Linked Data Views atop Remote Relational Data Sources]]
* W3C page for [[http://www.w3.org/TR/r2rml/][R2RML: RDB to RDF Mapping Language]]