Query over user's POD

It is the object NamedNode as you well said, but I returns the p the s and the q whereas my query it is a select on s? not p nor q. In fact it returns more triplets than the file contains.

I under the impression the api seems to be reading the whole file first…which brings the problem of scalability when a file becomes to big.

Yes, correct, there is no support for querying SPARQL in Solid. It is not in the spec. None of the current servers support it. Rdflib does client-side SPARQL processeing, so it always downloads the entire document. The one exception is SPARQL update which does allow you to patch part of a file without downloading the whole thing.

The reason you got all the triples is that you asked for everything. Specifying ?s ?p ?o basically says, give me everything. If you asked for ?s ?p ‘Bar’ you would only get triples where ‘Bar’ was the object.

Yes, you asked for “?s” and one would think that you should get back only ?s but you get back the entire triple. I may try to fix that in rdflib. Until it is fixed, you need to do as I showed above and say results[’?s’].value to get only the subject.

You get more triples than are in the file because rdflib adds tripples about the request itself to the store.

I will try what you suggested. Thanks very much for the help, really appreciate it.
It is a pity SPARQL is not in the spec, I´m working on a prototype to test the technology; creating a chat-share drive-social app. I got the foundations working but I cannot scale it, very frustrating and disappointing once my data grows it takes ages to load…I wonder how is Solid going to handle big data in the future or it ever would…

I suggest you take a look at the specification panels. You have certainly hit on a common use case that Solid does not currently address. The intention is to address it eventually, You can help by participating in the spec panels and letting them know what your use cases and requirements are.

2 Likes