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
<http://docs.openlinksw.com/virtuoso/r2rmlhow/> 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 <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();

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
<http://opldownload.s3.amazonaws.com/uda/vad-packages/6.3/virtuoso/rdb2rdf_dav.vad>
package.

Cheers

Beppe


2017-03-08 1:19 GMT+00:00 Hugh Williams <hwilli...@openlinksw.com>:

> 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
> <graph-name>” 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 <beppemazz...@gmail.com> 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 <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) 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
>
>
------------------------------------------------------------------------------
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