3

I'm relatively new to RDF/SPARQL and I'm trying to import and query some N-Quad, 4 column/quadruple data, into Blazegraph (See schemaOrgEvent.sample.txt).

When I import the Quads data (web console), I'm left with only triples-based 3-column tuple data, i.e. Blazegraph is allowing only SPARQL queries SELECTing {?s ?p ?o},but quadruple selections {?s ?p ?o ?c}, do not. What am I doing wrong???

Can Blazegraph store 4-column Quad data, natively, or am I mis-understanding the nature of RDF/Triple/Quad storage?

Also, the imported quad data, as well as becoming triples (normalised???), appears to have column 1 converted to another, Blazegraph-provided (?), identifier, the original (Quad) data format being (4-columns)

_:node03f536f724c9d62eb9acac3ef91faa9 <http://schema.org/PostalAddress/addressRegion> "Kentucky"@en <http://concerts.eventful.com/Lauren-Alaina> .

And after import (3-columns):

t1702   schema:PostalAddress/addressRegion  Kentucky

Whose query was:

SELECT * WHERE
{
    ?s ?p ?o
    #?s ?p ?o ?c - Won't work :-(
    FILTER(STR(?o)="Kentucky")
}

The value 't1702' is a 'foreign key' of sorts and can be used to link to other triples (i.e. it is repeated within the imported date).

scotthenninger
  • 3,921
  • 1
  • 15
  • 24
Big Rich
  • 5,864
  • 1
  • 40
  • 64

1 Answers1

7

SPARQL queries RDF triples. The fourth dimension of a Quad data store is the graph. RDF can be divided into separate graphs of triples, analogous to tables in a database. You may be able to query the Quad store with the following:

SELECT *
WHERE {
   GRAPH ?g {
      ?s ?p ?o
   }
}
scotthenninger
  • 3,921
  • 1
  • 15
  • 24