SERVICE support for In-Memory store
Opened this issue · 1 comments
giacomociti commented
I like to use SPARQL to process in-memory datasets in JavaScript. The icing on cake would be supporting the SERVICE keyword so I can enrich the in-memory dataset with data from a remote endpoint
For example, if the in-memory data has names for some entities, I could enrich it with the city of such entities from a remote endpoint.
INSERT { ?s :city ?city }
WHERE {
?s :name ?name
SERVICE <http://my.endpoint/query> {
?s :city ?city
}
}
A cumbersome alternative is to explicitly extract the bindings from the in-memory dataset:
SELECT ?s WHERE { ?s :name ?name }
query the remote endpoint injecting the bindings:
CONSTRUCT { ?s :city ?city } WHERE {
?s :city ?city
VALUES ?s { :a :b :c }
}
and use JavaScript code to add the triples from the endpoint into the in-memory dataset.
Tpt commented
Hi! Thank you for trying Oxigraph! Yes, it would be great indeed, it's on my TODO!