2 Answers
- Newest
- Most votes
- Most comments
0
The syntax of your second example query is incorrect for a couple of reasons.
See here:
.... PREFIX flows: <NS1#> INSERT DATA { GRAPH <GRAPH_URI> { flows#person--4c49da7e> a <http://xmlns.com/foaf/0.1/Person> ...
<NS1#>
is not a valid Namespace in RDF. Namespaces are IRI's, and as such need to have a ":" character to be valid, for example:<NS:1>
- flows#person--4c49da7e> is neither a full URI enclosed in "<>" or a use of the namespace "flows" as it does not have a ":" following the reference to 'flows.'
A valid query could be:
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX xml: <http://www.w3.org/XML/1998/namespace>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX flows: <NS1:>
INSERT DATA {
GRAPH <GRAPH:URI> {
flows:person--4c49da7e a <http://xmlns.com/foaf/0.1/Person>,
<http://www.w3.org/2002/07/owl#NamedIndividual>;
<http://xmlns.com/foaf/0.1/firstName> 'John';
<http://xmlns.com/foaf/0.1/family_name> 'Snow';
<http://xmlns.com/foaf/0.1/workplaceHomepage> 'http://example.com' .
}
}
answered a year ago
0
Yeah, I apologize. I was copying the queries over by hand from another computer and manually redacting the neptune logs. The queries themselves are valid (as they are accepted by Neptune) so any errors are in my transposition.
answered a year ago
Relevant content
- asked 2 years ago
- asked 9 months ago
- asked 8 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated 2 years ago
(as a side note, I tried calling the endpoint directly with python requests, but either the sparql protocol parameter
using-named-graph-uri
is ignored or there's some other issue because it was accepted with a 200 response but the triples aren't in the named graph.)what is the exact named graph you are specifying?
@charivie The name of the named graph varies, but is always of the form "graph--<UUID>".