Importing one RDF file into a Graph in one database

0 views
Skip to first unread message

fabio.f...@gmail.com

unread,
Sep 30, 2016, 11:09:35 AM9/30/16
to Stardog
Community edition 4.2

I created a database X and I need now to import in this database 6 graphs, each into X.
1 http://semweb.ch/demo/STW out of tile stw.rdf
2. http://semweb.ch/demo/EUROWOC out of tile eurovoc.rdf
3 ...

Does anyone know how to do this basic thing please?

Thank you in advance
Cheers

Zachary Whitley

unread,
Sep 30, 2016, 11:14:55 AM9/30/16
to sta...@clarkparsia.com
There should be an old thread on this subject somewhere.  You can either use a format that supports quads like n-quads or trig, or you can load them one at a time using "stardog data add" with the -g option to specify the graph. I don't think you can specify multiple graphs in a single call but check the man page just to be sure. 

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+unsubscribe@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
---
You received this message because you are subscribed to the Google Groups "Stardog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+unsubscribe@clarkparsia.com.

Zachary Whitley

unread,
Sep 30, 2016, 11:20:13 AM9/30/16
to sta...@clarkparsia.com


On Friday, September 30, 2016, Zachary Whitley <zachary...@gmail.com> wrote:


On Friday, September 30, 2016, <fabio.f...@gmail.com> wrote:
Community edition 4.2

I created a database X and I need now to import in this database 6 graphs, each into X.
1 http://semweb.ch/demo/STW out of tile stw.rdf
2. http://semweb.ch/demo/EUROWOC out of tile eurovoc.rdf
3 ...

Does anyone know how to do this basic thing please?


Thank you in advance
Cheers

There should be an old thread on this subject somewhere.  You can either use a format that supports quads like n-quads or trig, or you can load them one at a time using "stardog data add" with the -g option to specify the graph. I don't think you can specify multiple graphs in a single call but check the man page just to be sure. 


fabio.f...@gmail.com

unread,
Oct 4, 2016, 10:54:20 AM10/4/16
to Stardog, fabio.f...@gmail.com
Thank you Zacharias

from the doc manual page http://docs.stardog.com/man/data-add.html several graphs with triples can be added to a database.

Cheers
Fabio

fabio.f...@gmail.com

unread,
Oct 4, 2016, 11:01:56 AM10/4/16
to Stardog, fabio.f...@gmail.com
The next question

In my database there are now 6 graphs.

In order to get the name of these graphs I use the query:

SELECT DISTINCT ?graph
WHERE {
 GRAPH ?graph
 {
   ?a ?b ?b.
 }
}

Getting zero results - but expecting 6 graph urls.
But if I browse one of the graph with the nice stardog browser I get some data!!!

What am I doing wrong ?

Thanks

Fabio




On Friday, September 30, 2016 at 5:09:35 PM UTC+2, fabio.f...@gmail.com wrote:

Stephen Nowell

unread,
Oct 4, 2016, 11:07:56 AM10/4/16
to sta...@clarkparsia.com

Hi Fabio,

Your query is using the BGP { ?a ?b ?b }, which will never bind to anything since the predicate and object would need to match.

Try changing it to { ?a ?b ?c } or (to more easily avoid this kind of problem) { ?s ?p ?o }.

Cheers,
Stephen

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to

fabio.f...@gmail.com

unread,
Oct 4, 2016, 11:09:51 AM10/4/16
to Stardog, fabio.f...@gmail.com
Oppps!!! This was indeed a beginner mistake :)))))) Thank you very much!!! Will take a pause ....

Cheers
Fabio

PS: Yes then I am getting the graphs ;))





On Friday, September 30, 2016 at 5:09:35 PM UTC+2, fabio.f...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages