Skip to content

SPARQLConnector does not work with AWS Neptune #1600

Answered by gdbassett
zednis asked this question in Q&A
Discussion options

You must be logged in to vote

I was able to make this work with RDFLIB 6.2. This errored on RDFLIB 5.0.0 due to lack of encoding (error from requests)

Based on Ted Lawless's code above:

# I _think_ these are all the imports necessary
from rdflib import URIRef, Graph, Literal
from rdflib.plugins.stores.sparqlstore import SPARQLUpdateStore
from rdflib import RDFS

# Define some basics
URL = "https://<the name of your neptune server>:8182/sparql"
NEPTUNE_DEFAULT_GRAPH = URIRef('http://aws.amazon.com/neptune/vocab/v01/DefaultNamedGraph')

#establish the connection but explicitly use 'post' (passed to sparqlconnector)
#I'm ot even sure the `method='POST'` is necessary in 6.2.
store = SPARQLUpdateStore(method='POST')
store.…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by nicholascar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1231 on December 26, 2021 21:59.