Open candlecao opened 3 weeks ago
And I cannot query the graph in SPARQL.
How are the graphs being uploaded to Virtuoso ?
@candlecao
The NQuad file format have no syntax for @prefix
see https://www.w3.org/TR/rdf12-n-quads/#sec-grammar-grammar
Thus the 1st snippet is NOT Nquad, it is rather Turtle.
HTH
@candlecao
The NQuad file format have no syntax for
@prefix
see https://www.w3.org/TR/rdf12-n-quads/#sec-grammar-grammar Thus the 1st snippet is NOT Nquad, it is rather Turtle.HTH
Thank you! But how to query the file in SPARQL? It seems that we cannot use the normal select * where{?s ?p ?o}
method.
I asked ChatGpt, and it told me to query like:
SELECT * where {
graph ?g {
?s ?p ?o
}
}
But it doesn't work.
How are the graphs being uploaded to Virtuoso ?
I uploaded it from Conductor > Linked Data > Quad Store Upload. And I found that it doesn't matter whether the quad file is with .nq
format or .ttl
format.
The second NQUAD dataset you provided ie:
<https://thesession.org/recordings/1032> <http://example.org/includes> <https://thesession.org/tunes/1> <urn:relationship:1032_1> .
<https://thesession.org/recordings/1032> <http://www.wikidata.org/prop/direct/P658> "12"^^<http://www.w3.org/2001/XMLSchema#int> <urn:relationship:1032_1> .
<https://thesession.org/tunes/1> <http://www.wikidata.org/prop/direct/P1114> "1"^^<http://www.w3.org/2001/XMLSchema#int> <urn:relationship:1032_1> .
<https://thesession.org/recordings/1032> <http://example.org/includes> <https://thesession.org/tunes/629> <urn:relationship:1032_629> .
<https://thesession.org/recordings/1032> <http://www.wikidata.org/prop/direct/P658> "12"^^<http://www.w3.org/2001/XMLSchema#int> <urn:relationship:1032_629> .
<https://thesession.org/tunes/629> <http://www.wikidata.org/prop/direct/P1114> "2"^^<http://www.w3.org/2001/XMLSchema#int> <urn:relationship:1032_629> .
<https://thesession.org/recordings/3536> <http://example.org/includes> <https://thesession.org/tunes/1> <urn:relationship:3536_1> .
<https://thesession.org/recordings/3536> <http://www.wikidata.org/prop/direct/P658> "23"^^<http://www.w3.org/2001/XMLSchema#int> <urn:relationship:3536_1> .
<https://thesession.org/tunes/1> <http://www.wikidata.org/prop/direct/P1114> "1"^^<http://www.w3.org/2001/XMLSchema#int> <urn:relationship:3536_1> .
loads fine for me and I can see the 3 graphs created with triple counts:
graph count
urn:relationship:1032_1 3
urn:relationship:3536_1 3
urn:relationship:1032_629 3
What is the Virtuoso version being used and what does the output of running the following query to list and count triples in graph report:
SELECT ?graph (count(?s) as ?count) WHERE { GRAPH ?graph { ?s ?p ?o } } GROUP BY ?graph ORDER BY DESC(?count)
Thank you, I will try referring to your advice later.
I cannot upload a file with the suffix
.nq
onto Virtuoso. The content in the file is:However, if I don't use the namespace prefixes, see below, then I can upload the file onto Virtuoso:
Why?