Attributes | Values |
---|
type
| |
Date Created
| |
Date Modified
| |
label
| - VirtTipsAndTricksSPARQL11Copy
|
maker
| |
Title
| - VirtTipsAndTricksSPARQL11Copy
|
isDescribedUsing
| |
has creator
| |
content
| - %META:TOPICPARENT{name="VirtTipsAndTricksSPARQL11FeaturesExamplesCollection"}%
---+Virtuoso SPARQL 1.1. COPY Usage Examples
%TOC%
---++What?
This guide contains Virtuoso SPARQL 1.1. COPY Usage examples queries which you can run against any SPARQL endpoint that supports SPARQL 1.1 and the ability to allow a verified user perform INSERT operations.
---++Why?
Use as shortcut for inserting all data from an input graph into a destination graph. <b>Note</b> that the original content in the destination graph is lost by a COPY operation.
---++How?
Here are some examples showcasing Virtuoso's support for this functionality:
---+++COPY Example
This example copies all triples from a named graph identified by the IRI <urn:sparql:tests:copy:data> to a named graph identified by the IRI <urn:sparql:tests:copy2:data>
1 Assume the following Raw Data Representation in Turtle:
<verbatim>
<#book1> <#price> 41 .
<#book2> <#price> 42 .
</verbatim>
1 Load the sample data into <urn:sparql:tests:copy:data>:
<verbatim>
INSERT DATA
{
GRAPH <urn:sparql:tests:copy:data>
{
<#book1> <#price> 41 .
<#book2> <#price> 42 .
}
}
</verbatim>
1 Query graph <urn:sparql:tests:copy:data> data:
<verbatim>
SELECT *
FROM <urn:sparql:tests:copy:data>
WHERE
{
?s ?p ?o
}
</verbatim>
* [[http://bit.ly/YZlqAk][View the SPARQL Query Definition via SPARQL Protocol URL]];
* [[http://bit.ly/126rtUa][View the SPARQL Query Results via SPARQL Protocol URL]]
1 Assume the following Raw Data Representation in Turtle:
<verbatim>
<#book3> <#price> 43 .
<#book4> <#price> 44 .
</verbatim>
1 Load the sample data into <urn:sparql:tests:copy2:data>:
<verbatim>
INSERT DATA
{
GRAPH <urn:sparql:tests:copy2:data>
{
<#book3> <#price> 43 .
<#book4> <#price> 44 .
}
}
</verbatim>
1 Query graph <urn:sparql:tests:copy2:data> data:
<verbatim>
SELECT *
FROM <urn:sparql:tests:copy2:data>
WHERE
{
?s ?p ?o
}
</verbatim>
* [[http://bit.ly/10sxqob][View the SPARQL Query Definition via SPARQL Protocol URL]];
* [[http://bit.ly/XBiZSu][View the SPARQL Query Results via SPARQL Protocol URL]]
1 Copy all triples from <urn:sparql:tests:copy:data> to <urn:sparql:tests:copy2:data>
<verbatim>
COPY <urn:sparql:tests:copy:data> TO <urn:sparql:tests:copy2:data>;
</verbatim>
1 Query graph <urn:sparql:tests:copy2:data> data: <b>Note</b> that the original content in <urn:sparql:tests:copy2:data> is lost by a COPY operation:
<verbatim>
SELECT *
FROM <urn:sparql:tests:copy2:data>
WHERE
{
?s ?p ?o
}
</verbatim>
* [[http://bit.ly/10sxqob][View the SPARQL Query Definition via SPARQL Protocol URL]];
* [[http://bit.ly/XBiZSu][View the SPARQL Query Results via SPARQL Protocol URL]]
---++Related
* [[http://www.w3.org/TR/2012/PR-sparql11-update-20121108/#copy][SPARQL 1.1 COPY]]
* [[VirtTipsAndTricksGuideRenameGraph][Rename RDF Graph Example]]
* [[http://www.w3.org/TR/rdf-sparql-protocol/][SPARQL Protocol (HTTP based Query Service)]]
* [[VirtTipsAndTricksGuide][Virtuoso Tips and Tricks Collection]]
* [[VirtTipsAndTricksSPARQL11FeaturesExamplesCollection][Virtuoso SPARQL 1.1 Usage Examples Collection]]
* [[http://virtuoso.openlinksw.com/tutorials/sparql/SPARQL_Tutorials_Part_9/SPARQL_Tutorials_Part_9.html][Virtuoso SPARQL 1.1 Syntax Tutorial]]
* [[http://docs.openlinksw.com/virtuoso/rdfsparql.html][Virtuoso Documentation]]
|
id
| - aa79435cbae2d90d1e91b58104aef709
|
link
| |
has container
| |
http://rdfs.org/si...ices#has_services
| |
atom:title
| - VirtTipsAndTricksSPARQL11Copy
|
links to
| |
atom:source
| |
atom:author
| |
atom:published
| |
atom:updated
| |
topic
| |
is made
of | |
is container of
of | |
is link
of | |
is http://rdfs.org/si...vices#services_of
of | |
is creator of
of | |
is atom:entry
of | |
is atom:contains
of | |