There is a strange behaviour in the connection of the commandline tools of ARQ, TDB and Named Graphs. If importing data via tdbloader in a named graph it can not be queried
Try this query:
PREFIX :
SELECT * { { ?s ?p ?o } UNION { GRAPH ?g { ?s ?p ?o } } }
and the output is
----------------------------
| s | p | o | g |
============================
| | | | |
| | | | : |
----------------------------
or try:
tdbquery --loc DB --file Q.rq -results srj
to get the results in a different form.
The text output is makign things look nice but two different things end up as .
What you are seeing is that
tdbloader --desc tdb.ttl --graph data data.ttl
used data
exactly as is to name the graph. But
INSERT DATA {GRAPH { .}}
does a full SPARQL parse, and resolves against the base URI, probably looking like file://*currentdirectory*
.
When printing in text, URIs get abbreviated, including using the base. So both the original data
(from tdbloader) and file:///path/data
appear as .
PREFIX :
gives the text output a different way to write it as :
.
Finally try:
BASE
SELECT * { { ?s ?p ?o } UNION { GRAPH ?g { ?s ?p ?o } } }
which sets the base URI to something no where near your data URIs so switching off nice formatting by base URI:
----------------------------------------------------------------------------------------------------------------
| s | p | o | g |
================================================================================================================
| | | | |
| | | | |
----------------------------------------------------------------------------------------------------------------