Remove bulit-in graph loading for FROM and FROM NAMED in SPARQL evaluation · RDFLib/rdflib · Discussion #1541 (original) (raw)

Skip to content

Sign in

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Sign in

Sign up

RDFLib / rdflib Public

Additional navigation options

mwatts15 started this conversation inSafety

Remove bulit-in graph loading for FROM and FROM NAMED in SPARQL evaluation #1541

@mwatts15 mwatts15

Sep 25, 2021

· 5 comments

Return to top

Discussion options

{{title}}

Something went wrong.

mwatts15 Sep 25, 2021

There's logic in rdflib.plugins.sparql.evaluate to evaluate FROM and FROM NAMED in SPARQL queries that calls QueryContext.load in rdflib.plugins.sparql.sparql which loads graphs from remote resources. This behavior would be better handled by Store implementations (possibly indirectly through Graph): Stores can decide whether to use a locally stored graph or download one and from where, and the configuration that goes into the decision can be handled in the construction of the Store instance in Store.open rather than globally (e.g., with rdflib.plugins.sparql.SPARQL_LOAD_GRAPHS). The shared logic for loading the graph can be retained in a utility which stores can call if they need to load a graph and don't have their own mechanisms for doing so.

You must be logged in to vote

Replies: 5 comments

Comment options

{{title}}

Something went wrong.

nicholascar Sep 27, 2021

Maintainer

Hi @mwatts15 I need a working RDFlib FROM, FROM NAMED or SERVICE capability shortly as I want RDFlib-powered SPARQL-enabled APIs to query both local and remote endpoints. So I'm interested in this work.

You must be logged in to vote

0 replies

Comment options

{{title}}

Something went wrong.

white-gecko Sep 27, 2021

Maintainer

I had this issue already in #810, where I decided to just set rdflib.plugins.sparql.SPARQL_LOAD_GRAPHS = False and in #811 regarding the FROM and FROM NAMED part.
It would be very good to clean up the behavior of these.
@nicholascar Isn't SERVICE implemented in #943?

You must be logged in to vote

0 replies

Comment options

{{title}}

Something went wrong.

mwatts15 Sep 27, 2021

Author

@white-gecko Thanks. I had seen #811, but since I see no activity on it since it was written, I think a new issue which is more prescriptive is justified.

You must be logged in to vote

0 replies

Comment options

{{title}}

Something went wrong.

namedgraph Sep 26, 2023

@aucampia I think this should be disabled by default (i.e. rdflib.plugins.sparql.SPARQL_LOAD_GRAPHS = False should be the default) to make it compliant with the SPARQL spec.

You must be logged in to vote

0 replies

Comment options

{{title}}

Something went wrong.

apicouSP May 28, 2024

here I only load the remote graphs if not found in the given ConjunctiveGraph. Would that solve this issue?
That wasn't my goal so I didn't implemented in the store like you said. But at least you can use named graphs without setting SPARQL_LOAD_GRAPHS to False

You must be logged in to vote

0 replies

Sign up for free to join this conversation on GitHub. Already have an account?Sign in to comment

Category

Safety

Labels

SPARQL

5 participants

@mwatts15 @namedgraph @white-gecko @nicholascar @apicouSP

Converted from issue

This discussion was converted from issue #1421 on December 25, 2021 15:15.

Heading

Bold

Italic

Quote

Code

Link


Numbered list

Unordered list

Task list


Attach files

Mention

Reference

Menu

Select a reply

Loading

Create a new saved reply

👍 1 reacted with thumbs up emoji 👎 1 reacted with thumbs down emoji 😄 1 reacted with laugh emoji 🎉 1 reacted with hooray emoji 😕 1 reacted with confused emoji ❤️ 1 reacted with heart emoji 🚀 1 reacted with rocket emoji 👀 1 reacted with eyes emoji