In isql-vt
(the Ubuntu name for Virtuoso's isql
), I am trying to import a test .ttl file, but get the error "Can't stat file":
SQL> DB.DBA.TTLP(file_to_string_output('./scratch/ttl/granule.ttl'),'','http://origin.mytest.org/');
*** Error 42000: [Virtuoso Driver][Virtuoso Server]FA112: Can't stat file './scratch/ttl/granule.ttl', error (2) : No such file or directory
However, the file is definitely there; I can even cat
it:
SQL> !cat ./scratch/ttl/granule.ttl;
@prefix datacite: <http://purl.org/spar/datacite/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
<http://0.0.0.0:3000/granule/MOD09.A2016278.0110.006.2016279074214.hdf>
datacite:identifier "MOD09.A2016278.0110.006.2016279074214.hdf";
prov:wasGeneratedBy <http://0.0.0.0:3000/run/MODAPS_456056327>;
a prov:entity .
SQL>
Why is the DB.DBA.TTLP
command saying it can't stat it?
Trying to use the full path gave a much better error message:
So, the solution was to add the path in
/etc/virtuoso-opensource-6.1/virtuoso.ini
, eg:and restart virtuoso for the change to take effect.