Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

LOAD FROM with WHERE body #188

Open
kurtcagle opened this issue May 24, 2023 · 0 comments
Open

LOAD FROM with WHERE body #188

kurtcagle opened this issue May 24, 2023 · 0 comments

Comments

@kurtcagle
Copy link

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:

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant