Skip to content
Snippets Groups Projects
Commit 67f3c95c authored by Frank Lange's avatar Frank Lange
Browse files

use the read-only query endpoint for SPARQL queries

document separation of query and data manipulation interfaces
parent 52455075
No related branches found
No related tags found
No related merge requests found
Pipeline #1647397 passed
......@@ -30,7 +30,7 @@ def query_dataset(dataset: Dataset, query: str) -> Result:
# TODO: find out whether we can use one and the same SPARQLStore object for all (parallel) queries
def _get_sparql_store(dataset: Dataset) -> SPARQLStore:
return SPARQLStore(query_endpoint=f"{_get_triplestore_endpoint_from_settings()}{dataset.value}")
return SPARQLStore(query_endpoint=f"{_get_triplestore_endpoint_from_settings()}{dataset.value}/query")
def _get_triplestore_endpoint_from_settings() -> str:
......
......@@ -56,3 +56,7 @@ Our business logic uses a [query builder](https://git.rwth-aachen.de/dalia/backe
#### URIs
`URIRef`'s [`n3()` method](https://rdflib.readthedocs.io/en/stable/apidocs/rdflib.html#rdflib.term.URIRef.n3) tests for [invalid characters](https://github.com/RDFLib/rdflib/blob/main/rdflib/term.py#L101-L108) in the URI and raises an exception upon detection.
### Separation of query and data manipulation interfaces
[DALIA's Fuseki triplestore](https://git.rwth-aachen.de/dalia/backend/fuseki) offers separate HTTP endpoints that support different protocols from the SPARQL protocol family (SPARQL query, SPARQL/Update (SPARUL) and the Graph Store HTTP Protocol (GSP)). Requests that concern querying data should be sent to the read-only endpoints (SPARQL query, GSP read) and requests that concern data manipulation should be sent to the write endpoints (SPARUL and GSP write).
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment