2
$\begingroup$

When using SPARQLSelect on Entity Types the entire entity store is downloaded to the local cache.

For example,

SPARQLSelect[
  {
     RDFTriple[SPARQLVariable["city"], EntityProperty["City", "Name"],
       SPARQLVariable["cityName"]]
     } /; 
    SPARQLEvaluation["CONTAINS"][SPARQLVariable["cityName"], 
     "Lon"] -> 
   {"city"}
  ][Entity["City"]]

Mathematica graphics

This first downloads 164,599 entity values to the local cache before evaluating the query locally.

With SPARQLExecute the query can be evaluated on the graph database server and only the results returned. However I have not been able to find the Wolfram graph-store entity URL in the documentation.

Is there a way to SPARQLExecute an entity query on the Wolfram graph-store URL? Or, alternatively, execute the SPARQL query without it killing the kernel?

I would like to evaluate the following but, after the entity stores are downloaded, the kernel dies just after a system low memory warning pop-up appears.

SPARQLSelect[
  {
     RDFTriple[SPARQLVariable["city"], EntityProperty["City", "Name"],
       SPARQLVariable["cityName"]],
     RDFTriple[SPARQLVariable["airport"], 
      EntityProperty["Airport", "Name"], SPARQLVariable["airportName"]]
     } /; 
    SPARQLEvaluation["CONTAINS"][SPARQLVariable["airportName"], 
     SPARQLVariable["cityName"]] -> 
   {"city", "airport"}
  ][{Entity["City"], Entity["Airport"]}]
$\endgroup$
  • $\begingroup$ I am not aware of a publicly available SPARQL endpoint for the Wolfram Knowledgebase (with which you could use SPARQLService or similar). It might be worth asking about this on the Wolfram Community forum. $\endgroup$ – Carl Lange May 1 at 15:42
  • $\begingroup$ Cross-posted on Wolfram Community 1674179. $\endgroup$ – Edmund May 1 at 16:05
  • $\begingroup$ Confirmed on Wolfram Community forums that the kernel crash part of this question is an implementation issue with the SPARQL functions in version 12.0. $\endgroup$ – Edmund May 2 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.