Hi to all

Recently I have sent two e-mails to this forum about two different problems:


   - *Unable to iterate over a SPARQL query referring to a graph.* In a
   stored procedure the iterations over a SPARQL statement result set are not
   executed. See
   https://sourceforge.net/p/virtuoso/mailman/message/35686416/


   - *Unable to delete a graph content * Some graphs are impossible to
   delete, despite the deletion commands do not issue any error. See
   https://sourceforge.net/p/virtuoso/mailman/message/35655255/


Now I have found that they are related. Both happen *only *with RDF graphs
which content is generated with the R2RML mapping feature using the
procedures DB.DBA.TTLP() and DB.DBA.R2RML_MAKE_QM_FROM_G() .


I would like to know if anybody has ever succeeded to delete a graph
generated in this way or to iterate over a SPARQL statement referencing to
a such a graph inside a stored procedure (the same SPARQL statement run
interactively works).

Who is interested in reproducing the problem below there is what I think
should allow it.

I use Virtuoso Open Source Edition (multi threaded)
Version 7.2.4.3217-threads as of Apr 25 2016
Compiled for Win64 (x86_64-generic-win-64)


Thanks!

Cheers

Beppe



*Deletion Problem*
I have executed the basic.sql example given by OpenLink Software about how
to use R2RML <http://docs.openlinksw.com/virtuoso/r2rmlhow/>and I see that
the generated RDF graph cannot be deleted. At the bottom of this e-mail
there is the session in which I run the example and the graph deletion
fails.

*Iteration over a SPARQL query*
After executing the basic.sql example the following commands allow to
perform an iteration on the graph.


create procedure R2RML.TEST.try() returns integer
{
  for (sparql define input:storage ""
    select ?o
    #from <http://localhost:8890/sparql>
    from <http://example.com/>
    where { ?s ?p ?o } LIMIT 5 ) do
    {
      string_to_file ('trashMe.txt', "o"||'\n', -1);
    };
};
R2RML.TEST.try();



In my installation no iteration is performed with these commands. Changing
with a non-generated graph instead (for example the commented out one) the
iterations are performed.


I have reinstalled Virtuoso Open Source for Windows together with the
rdb2rdf_dav vad package (from here)
<http://s3.amazonaws.com/opldownload/uda/vad-packages/7.0/rdb2rdf_dav.vad>before
performing the test, in order to have an environment unaffected by previous
operations.





SQL> load .\basic.sql;
Done. -- 4 msec.
Done. -- 16 msec.
Done. -- 0 msec.
Done. -- 0 msec.
Done. -- 0 msec.
STATE    MESSAGE
VARCHAR  VARCHAR
_______________________________________________________________________________

00000    IRI class <r2rml:virt02-d6310c8f81a31b40880be84617cef62c> has been
defined (inherited from rdfdf:sql-integer-uri-nullable)
00000    Literal class <r2rml:virt02-bf406ba67f39c90ee07c9e8b9f0611ae> has
been defined (inherited from rdfdf:sql-integer-literal-nullable)
00000    Quad storage <
http://www.openlinksw.com/schemas/virtrdf#DefaultQuadStorage> is flagged as
being edited
00000    Quad map <http://temp/product> has been created and added to the <
http://www.openlinksw.com/schemas/virtrdf#DefaultQuadStorage>
00000    Quad map <sys:qm-0b840fec4c625440d1915a0ae8e5cab9> has been
created and added to the <
http://www.openlinksw.com/schemas/virtrdf#DefaultQuadStorage>
00000    Quad map <sys:qm-84e7c00e26da8476895ddc0d779d2538> has been
created and added to the <
http://www.openlinksw.com/schemas/virtrdf#DefaultQuadStorage>
00000    Quad map <sys:qm-60348ca058fc088a9c89f6e10efc15f9> has been
created and added to the <
http://www.openlinksw.com/schemas/virtrdf#DefaultQuadStorage>
00000    Quad storage <
http://www.openlinksw.com/schemas/virtrdf#DefaultQuadStorage> is unflagged
and can be edited by other transactions
00000    Transaction committed, SPARQL compiler re-configured
00000    9 RDF metadata manipulation operations done

10 Rows. -- 297 msec.
SQL>
SQL>
SQL> sparql select * from <http://example.com/> where {?s ?p
?o};
s
p                                                o
LONG VARCHAR                       LONG
VARCHAR                                     LONG VARCHAR
___________________________________



http://example.com/product/1       http://example.com/product#id
1
http://example.com/product/1       http://example.com/product#name
Virtuoso
http://example.com/product/1
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://example.com/ns#product


3 Rows. -- 16
msec.

SQL>

SQL> SPARQL CLEAR GRAPH <http://example.com/>;

callret-0

LONG
VARCHAR

____________________________________________________________________



Clear graph <http://example.com/> --
done



1 Rows. -- 16
msec.

SQL>

SQL>

SQL> sparql select * from <http://example.com/> where {?s ?p
?o};
s
p                                                o
LONG VARCHAR                      LONG
VARCHAR                                     LONG VARCHAR
__________________________________



http://example.com/product/1      http://example.com/product#id
1
http://example.com/product/1      http://example.com/product#name
Virtuoso
http://example.com/product/1
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://example.com/ns#product


3 Rows. -- 15
msec.
------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to