You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been making use of transaction pipelines in SPARQL UPDATE for a while now, and one thing I've discovered is that the LOAD command (unlike all other mutation commands) does not take a WHERE clause. However, I have run into situations where I've wanted to load different RDF content into a triple store based upon some state within the store itself. A WHERE clause would resolve this.
Previous work
Proposed solution
I propose that the following syntax be valid:
LOAD FROM ?var INTO GRAPH ?g WHERE {
#Expression determining ?var and possibly ?g
};
In this case ?var would contain an HTTP or file URL.
If ?var is unbound, the LOAD would fail silently.
This becomes very useful in those case where you either wanted to load a given dataset based upon a soft reference within the knowledge graph, in those cases where you only wanted the LOAD to occur conditionally based upon a variable, or where you wanted the LOAD to place the output into one of multiple places depending upon the WHERE clause evaluation.
Considerations for backward compatibility
In the absence of the WHERE clause, the file reference would have to be explicit, or a proxy (LOAD FROM) would need to be declared to differentiate the LOAD and LOAD FROM case.
The text was updated successfully, but these errors were encountered:
Why?
I've been making use of transaction pipelines in SPARQL UPDATE for a while now, and one thing I've discovered is that the LOAD command (unlike all other mutation commands) does not take a WHERE clause. However, I have run into situations where I've wanted to load different RDF content into a triple store based upon some state within the store itself. A WHERE clause would resolve this.
Previous work
Proposed solution
I propose that the following syntax be valid:
In this case ?var would contain an HTTP or file URL.
If ?var is unbound, the LOAD would fail silently.
This becomes very useful in those case where you either wanted to load a given dataset based upon a soft reference within the knowledge graph, in those cases where you only wanted the LOAD to occur conditionally based upon a variable, or where you wanted the LOAD to place the output into one of multiple places depending upon the WHERE clause evaluation.
Considerations for backward compatibility
In the absence of the WHERE clause, the file reference would have to be explicit, or a proxy (LOAD FROM) would need to be declared to differentiate the LOAD and LOAD FROM case.
The text was updated successfully, but these errors were encountered: