how to read SPARQL query from a file?

0 views
Skip to first unread message

Paulo Elias

unread,
Mar 28, 2014, 10:39:12 AM3/28/14
to sta...@clarkparsia.com
Hi everybody!

I am learning how to use Stardog...

Is there a way to read a file containing a SPARQL query, so I don't have to write all the query in the CLI ?

I know that using Jena ARQ CLI I can use the following syntax to do this task, where example-03.rq has a SPARQL query.:

arq --query=example-03.rq --data=../rdf/knows.n3 --data=../rdf/cafes.n3 

 Is there something similar in CLI or web console at Stardog?

Thanks,

Paulo

Kendall Clark

unread,
Mar 28, 2014, 10:48:34 AM3/28/14
to stardog
The last argument to stardog query subcommand is either a query or a filename containing (one) valid query.

This is mentioned at the very end of the man page but it's admittedly a bit hard to see there. We'll make it more obvious in the next release.

Cheers,
Kendall 

Paulo Elias

unread,
Mar 28, 2014, 11:49:51 AM3/28/14
to sta...@clarkparsia.com
Thanks, Kendall!

It worked! I used this command to execute the query:

> stardog query ex1 -r=QL q4.rq

An example like this in the documentation would be very helpful.

Best,

Paulo
Reply all
Reply to author
Forward
0 new messages