Not logged in : Login

About: VirtTipsAndTricksGuideConstructINSERTStatement     Goto   Sponge   Distinct   Permalink

An Entity of Type : atom:Entry, within Data Space : ods.openlinksw.com associated with source document(s)

AttributesValues
type
Date Created
Date Modified
label
  • VirtTipsAndTricksGuideConstructINSERTStatement
maker
Title
  • VirtTipsAndTricksGuideConstructINSERTStatement
isDescribedUsing
has creator
content
  • ---+How can I use INSERT via CONSTRUCT Statements? ---++What? Use of SPARUL to add triples to a Named Graph. ---++Why? Imagine a situation where you seek to create mappings between datasets across Linked Data Spaces. For example, we have two datasets across the schema.org and schema.rdfs.org data spaces and we seek to mint owl:equivalentClass and owl:equivalentProperty relations across the aforementioned data spaces in a third dataspace hosted by a Virtuoso instance. ---++How? You can write an ordinary CONSTRUCT statement, ensure that it generates the triples intended to be added, and then replace the leading CONSTRUCT keyword with the INSERT INTO <destination-graph> phrase. The example below shows how CONSTRUCT is used to manufacture the triples required by the Virtuoso hosted dataset. ---+++Example 1 Assume the following CONSTRUCT statement: <verbatim> CONSTRUCT { ?s <http://www.w3.org/2002/07/owl#equivalentClass> `iri (bif:replace(?o,'http://schema.rdfs.org/', 'http://schema.org/'))` } FROM <http://www.openlinksw.com/schemas/rdfs> WHERE { ?s <http://www.w3.org/2002/07/owl#equivalentClass> ?o }; </verbatim> 1 Execute the CONSTRUCT query from the <code>htp://cname/sparql</code> SPARQL endpoint. 1 View the generated triples to ensure they are correct. 1 Replace CONSTRUCT with INSERT INTO: <verbatim> SPARQL INSERT INTO <http://www.openlinksw.com/schemas/rdfs> { ?s <http://www.w3.org/2002/07/owl#equivalentClass> `iri (bif:replace(?o,'http://schema.rdfs.org/', 'http://schema.org/'))` } FROM <http://www.openlinksw.com/schemas/rdfs> WHERE { ?s <http://www.w3.org/2002/07/owl#equivalentClass> ?o } ; </verbatim> ---+++Related * [[VirtTipsAndTricksGuide][Virtuoso Tips and Tricks Collection]]. * [[http://docs.openlinksw.com/virtuoso/rdfandsparql.html][RDF Data Access and Data Management]]. * [[VirtTipsAndTricksGuideConstructPreparedStatement][Usage of CONSTRUCT with Prepared Statements]].
id
  • 6023271ec08e0129b7dcea488a081efb
link
has container
http://rdfs.org/si...ices#has_services
atom:title
  • VirtTipsAndTricksGuideConstructINSERTStatement
links to
atom:source
atom:author
atom:published
  • 2017-06-13T05:48:37Z
atom:updated
  • 2017-06-13T05:48:37Z
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
Faceted Search & Find service v1.17_git150 as of Jan 20 2025


Alternative Linked Data Documents: iSPARQL | ODE     Content Formats:   [cxml] [csv]     RDF   [text] [turtle] [ld+json] [rdf+json] [rdf+xml]     ODATA   [atom+xml] [odata+json]     Microdata   [microdata+json] [html]    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 08.03.3332 as of Sep 11 2024, on Linux (x86_64-generic-linux-glibc25), Single-Server Edition (15 GB total memory, 777 MB memory in use)
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2025 OpenLink Software