-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support to Virtuoso Openlink Sparql Endpoint #20
Comments
Hi Samur This query works for me on the dbpedia endpoint: DESCRIBE ?uri WHERE { SELECT DISTINCT ?uri (http://dbpedia.org as ?graph) WHERE { GRAPH (Please note that I added a LIMIT clause in my test, to avoid retrieving too much data). The problem with your query seems to be that there are no '<' and '>' around the URIs. I must admit I don't know what 'define sql:big-data-const 0' means as I'm not really familiar with Virtuoso's extra features. Is that a query that was generated automatically by Tripod? If that is the case can you paste the code you used to create your 'Book' object in Tripod. Perhaps there is something wrong there that we might be able to help with. In general, Tripod is based on SPARQL 1.1 and should work with any endpoint that supports that. |
Ah, it seems that the Github comments box strips some formatting - sorry! This is my working query, hopefully now showing correctly DESCRIBE ?uri WHERE { SELECT DISTINCT ?uri (<http://dbpedia.org> as ?graph) WHERE { GRAPH So I imagine your original query did in fact have the angle brackets. So I'm not sure what the problem is, other than perhaps something to do with that initial define statement. |
I'm having the same problem with Virtuoso, I think. I have the following model Tripod.configure do |config|
config.query_endpoint = 'http://www.leipzig-data.de:8890/sparql'
config.timeout_seconds = 30
end
class Street
include Tripod::Resource
rdf_type "http://leipzig-data.de/Data/Model/Strasse"
graph_uri "http://leipzig-data.de/Data/Strassenverzeichnis/"
field :label, RDF::RDFS.label
end And when I try 'Street.first' in a console I get this error back:
The actual query (formatted) seems to be this:
Which gives the error when I try it on the virtuoso console: http://www.leipzig-data.de:8890/sparql I can confirm that @fonji 's fix actually works - at least in the console adding an extra brackets to the outer SELECT statement gives the correct results. But why, I don't understand... It seems to be related to Virtuoso, because I got this working on a local instance of Fuseki. Any ideas how this could be fixed? |
Just as an additional data point, here's the output from fuseki, when I run the following:
Log:
|
I think point 4 of Virtuoso's documentation about subqueries kind of explains this. |
Do you api support any sparql endpoint?
I try to run a command like Book.all.resources and I got this error:
Tripod::Errors::BadSparqlRequest (Virtuoso 37000 Error SP030: SPARQL compiler, line 1: syntax error at 'SELECT' befor
e 'DISTINCT'
SPARQL query:
define sql:big-data-const 0 DESCRIBE ?uri WHERE { SELECT DISTINCT ?uri (http://dbpedia.org as ?graph) WHERE { GRAPH
http://dbpedia.org { ?uri a http://dbpedia.org/ontology/Book . ?uri ?p ?o } } }):
app/controllers/search_controller.rb:4:in `index'
This error was cause because the syntax of the describe query is incorrect.
Did you implement the queries according to the sparql specification?
The project is really great and I hope it takes off.
Best,
Samur
The text was updated successfully, but these errors were encountered: