R3000
(R3000)
August 21, 2019, 8:06pm
1
I've tried to laod the trig file via studio - no luck. I used the command line and it shows 90 triples loaded besides the db icon.
$ ./stardog data add MyDB pp_project_mydb.trig
The following sparql returns zero rows:
SELECT ?s ?p ?o
WHERE
{ ?s ?p ?o
} LIMIT 50 OFFSET 0
Am I doing something wrong?
Thanks,
Radu
jess
(Jess Balint)
August 21, 2019, 8:07pm
2
Hey Radu,
Is your data in the trig file in the default graph? The query is over the default graph.
R3000
(R3000)
August 21, 2019, 8:10pm
3
i doubt it is in default graph ... it is some sort of skos scheme - but i have added the "skos" archtype to db and restarted it.
jess
(Jess Balint)
August 21, 2019, 8:13pm
4
You have several options here:
Include a graph variable in your query from { graph ?g { ?s ?p ?o } }
Query over all graphs from <tag:stardog:api:context:all> { ?s ?p ?o }
These queries will include matches from not only the default graph, but also named graphs.
R3000
(R3000)
September 4, 2019, 3:54pm
6
Jess - I had the query working but with latest studio ugrade - command history is gone - and my select is no longer working against all (virtual) graphs
SELECT * {
GRAPH <tag:stardog:api:context:all> { ?s ?p ?o }
}
Is the above close enough?
Thanks,
Radu
jess
(Jess Balint)
September 4, 2019, 3:56pm
7
You should include the special graph IRI in the dataset specification:
select * from <tag:stardog:api:context:all> {
?s ?p ?o
}
R3000
(R3000)
September 4, 2019, 3:59pm
8
ok that worked - thank you - but bringing too much info now ...
How do I query for a single virtual graph that was created like:
PREFIX : <http://sample/docs/>
MAPPING <urn:docs>
FROM GraphQL {
documents{
...
jess
(Jess Balint)
September 4, 2019, 5:34pm
9
You can query the virtual graph using a graph clause:
GRAPH <virtual://documents> {
...
}
R3000
(R3000)
September 4, 2019, 5:52pm
10
I am getting zero rows back for this query:
SELECT * {
GRAPH <virtual://documents> { ?s ?p ?o }
}
pymongo find brings back 10 documents
What command did you run to add the virtual graph?
R3000
(R3000)
September 4, 2019, 7:23pm
12
I have first used this:
./stardog-admin virtual add --overwrite --format SMS2 mongodb.properties documents.sms
Then modified the VG via studio. I have also tried to revert it - successfully - but still zero rows back
jess
(Jess Balint)
September 4, 2019, 9:36pm
13
From docs:
Name of the configuration file without the extension will be the name of the virtual graph.
So virtual graph name with be mongodb
.
system
(system)
Closed
September 18, 2019, 9:47pm
14
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.