Hi Daniel,
Details on passing parameters in SPARQL queries can be found at:
http://docs.openlinksw.com/virtuoso/rdfsparql.html#rdfsparqlinline
<http://docs.openlinksw.com/virtuoso/rdfsparql.html#rdfsparqlinline>
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 4 Sep 2015, at 21:05, Davis, Daniel (NIH/NLM) [C] <[email protected]>
> wrote:
>
> I’m trying to implement a versioning policy our linked data, and when I see ,
> located athttp://id.nlm.nih.gov/mesh <http://id.nlm.nih.gov/mesh>. We
> currently load the triples each night, and we want to start being sensitive
> to which subjects no longer appear in the graph, updating the triples of
> subjects that exist in the new schema, and marking the subjects that do not
> exist in the old schema as “obsolete”.
>
> I’ve come up with a query that allows me to do some logic on specific
> subjects, but I need then to parameterize the copy of data. We’d prefer to
> do this in Virtuoso/PL, but I’ve not yet figured out how to do something like
> this:
>
> CREATE PROCEDURE test_insert(in source_graph varchar, in target_graph
> varchar, in subject_uri varchar) {
> DECLARE target_iid iri_id;
> DECLARE subject_iid iri_id;
>
> target_iid := rdf_make_iid_of_qname(target_graph);
> subject_iid := rdf_make_iid_of_qname(subject_uri);
>
> DELETE FROM RDF_QUAD WHERE g = target_iid AND s = subject_iid;
> SPARQL INSERT { GRAPH target_graph { uri ?p ?o } } USING source_graph WHERE
> { uri ?p ?o };
> }
>
> Any help would be appreciated.
>
> Thanks,
>
> Dan Davis, Systems/Applications Architect (Contractor),
> Office of Computer and Communications Systems,
> National Library of Medicine, NIH
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Virtuoso-users mailing list
> [email protected]
> <mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
> <https://lists.sourceforge.net/lists/listinfo/virtuoso-users>
------------------------------------------------------------------------------
_______________________________________________
Virtuoso-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/virtuoso-users