Re: [Virtuoso-users] Unable to delete a graph content / Unable to iterate on graph triples - Same problem?!

2017-03-08 Thread Beppe Mazzola
Hi Hugh

Thanks for the remarks. No, the triples which I refer to are "real".

I have found a way to reproduce the problem, that at this point could be an
issue of Virtuoso Open Source.

The RDF graphs generated using DB.DBA.TTLP() and DB.DBA.R2RML_MAKE_QM_FROM_G()
procedures cannot be deleted and cannot be queried with a for (sparql ...)
do {} statement.

If you follow the example in the page Virtuoso R2RMLSupport
 running the proposed
script basic.sql
the resulting graph cannot be deleted and queried this way.

I bring here again the code I used to query the result graph.

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

It does not iterate over the 3 quads of the graph. I tried as well to use
the

dump_one_graph procedure (on another generated graph, not this) and I
have noticed that the graph is not
dumped.

I have run the basic.sql example as dba with a Windows Virtuoso Open Source
just installed together with the rdb2rdf_dav.vad

package.

Cheers

Beppe


2017-03-08 1:19 GMT+00:00 Hugh Williams :

> Hi Beppe,
>
> If these are RDF Linked Data View “Virtual” Graphs then these are stored
> in a different Quad Map storage location, see:
>
> http://docs.openlinksw.com/virtuoso/rdfviewquadmapatternsvalueandi
> riclasses/
>
> But you should be able to delete such graphs wit the “drop graph
> ” sparql query as indicated in the “Delete RDF Graphs” section
> of the following white paper on "Mapping Relational Data to RDF with
> Virtuoso's RDF Views” :
>
> https://virtuoso.openlinksw.com/whitepapers/relational%
> 20rdf%20views%20mapping.html
>
> Or the indicated alternative SQL method of manually deleting Virtual
> graphs (from when drop graph was not supported) can be used ...
>
> Best Regards
> Hugh Williams
> Professional Services
> OpenLink Software, Inc.  //  http://www.openlinksw.com/
> Weblog   -- http://www.openlinksw.com/blogs/
> LinkedIn -- http://www.linkedin.com/company/openlink-software/
> Twitter  -- http://twitter.com/OpenLink
> Google+  -- http://plus.google.com/100570109519069333827/
> Facebook -- http://www.facebook.com/OpenLinkSoftware
> Universal Data Access, Integration, and Management Technology Providers
>
>
>
> > On 6 Mar 2017, at 17:40, Beppe Mazzola  wrote:
> >
> > 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 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 
> > from 
> > 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.

Re: [Virtuoso-users] Unable to delete a graph content / Unable to iterate on graph triples - Same problem?!

2017-03-07 Thread Hugh Williams
Hi Beppe,

If these are RDF Linked Data View “Virtual” Graphs then these are stored in a 
different Quad Map storage location, see:


http://docs.openlinksw.com/virtuoso/rdfviewquadmapatternsvalueandiriclasses/

But you should be able to delete such graphs wit the “drop graph ” 
sparql query as indicated in the “Delete RDF Graphs” section of the following 
white paper on "Mapping Relational Data to RDF with Virtuoso's RDF Views” :


https://virtuoso.openlinksw.com/whitepapers/relational%20rdf%20views%20mapping.html

Or the indicated alternative SQL method of manually deleting Virtual graphs 
(from when drop graph was not supported) can be used ...

Best Regards
Hugh Williams
Professional Services
OpenLink Software, Inc.  //  http://www.openlinksw.com/
Weblog   -- http://www.openlinksw.com/blogs/
LinkedIn -- http://www.linkedin.com/company/openlink-software/
Twitter  -- http://twitter.com/OpenLink
Google+  -- http://plus.google.com/100570109519069333827/
Facebook -- http://www.facebook.com/OpenLinkSoftware
Universal Data Access, Integration, and Management Technology Providers



> On 6 Mar 2017, at 17:40, Beppe Mazzola  wrote:
> 
> 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 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 
> from 
> 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) 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.
> STATEMESSAGE
> VARCHAR  VARCHAR
> ___
> 
> 0IRI class  has been 
> defined (inherited from rdfdf:sql-integer-uri-nullable)
> 0Literal class  has 
> been defined (inherited from rdfdf:sql-integer-literal-nullable)
> 0Quad storage 
>  is flagged as 
> being edited
> 0Quad map  has been created and added to the 
> 
> 0Quad map  has been created 
> and added to the 
> 
> 0Quad map  has been created 
> and added to the 
> 
> 0Quad map  has been created 
> and added to the 
> 
> 0Quad storage 
>  is unflagged 
> and can be edited by other transactions
> 0Transaction committed, SPARQL compiler re-configured
> 09 RDF metadata manipulation