Skip to content

Working with Virtuoso ISQL

Nolan Nichols edited this page May 1, 2014 · 1 revision

The isql command I've used in the past is ld_dir (http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtBulkRDFLoaderExampleSingle), but it looks like you need to grant permissions to whatever directory you want to load from in the ini file.

Find the ini file by running this:

SQL> select server_root (), virtuoso_ini_path ();

​Then edit the virtuoso.ini file by adding a path to "DirsAllowed​" and restart virtuoso.

In the example below, I've already granted access to my downloads directory in virtuoso.ini

SQL> ld_dir ('/Users/nolan/Downloads', 'graph6063687091775398521.ttl', 'http://iri.nidash.org/');
Done. -- 3 msec.
SQL> rdf_loader_run ();
Done. -- 16 msec.
SQL> SPARQL
Type the rest of statement, end with a semicolon (;)> SELECT * FROM <http://iri.nidash.org/> WHERE { ?s ?p ?o };

This approach requires that you have access to the machine hosting the virtuoso instance and is much more efficient than uploading through the sparql endpoint, which has some limitations on the number of triples that can be uploaded in a single SPARQL insert statement.

Clone this wiki locally