sul-dlss-deprecated / sparql-loader

Proxies a SPARQL server and sends SNS messages when commands are processed.
0 stars 0 forks source link

Bug: SPARQL Update with Named Graph is not Registering Subjects at all #12

Closed cmharlow closed 6 years ago

cmharlow commented 6 years ago

See the SPARQL Update message below.

This is using Python's rdflib to generate the SPARQL request.

INSERT { GRAPH <http://sul.stanford.edu/rialto/sources/test2> { <http://sul.stanford.edu/rialto/context/positions/capFaculty_Bio-ABC_3784> <http://vivoweb.org/ontology/core#hrJobTitle> "George A. Zimmermann Professor and Professor of Pediatrics" .
                <http://sul.stanford.edu/rialto/agents/orgs/Child_Health_Research_Institute> <http://vivoweb.org/ontology/core#relatedBy> <http://sul.stanford.edu/rialto/context/positions/capFaculty_Child_Health_Research_Institute_3784> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Stanford_Neurosciences_Institute_3784> <http://vivoweb.org/ontology/core#relates> <http://sul.stanford.edu/rialto/agents/people/3784> .
                <http://sul.stanford.edu/rialto/agents/people/3784> <http://vivoweb.org/ontology/core#relatedBy> <http://sul.stanford.edu/rialto/context/relationships/75872_3784> .
                <http://sul.stanford.edu/rialto/context/names/75872> <http://www.w3.org/2006/vcard/ns#given-name> "Noga" .
                <http://sul.stanford.edu/rialto/agents/people/3784> <http://vivoweb.org/ontology/core#hasResearchArea> <http://sul.stanford.edu/rialto/concepts/autoimmunity%2C_neuroimmunology%2C_immunology%2C_multiple_sclerosis%2C_Neurobiology%2C_Neuroscience%2C_Translational_Medicine%2C_Molecular_Medicine_%26_Human_Disease%2C_Immunology> .
                <http://sul.stanford.edu/rialto/agents/people/3784> <http://vivoweb.org/ontology/core#overview> "My research is in neuroimmunology. I attend on the inpatient service at LPCH." .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Pediatrics_3784> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Position> .
                <http://sul.stanford.edu/rialto/context/roles/AdvisorRole> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#AdvisorRole> .
                <http://sul.stanford.edu/rialto/agents/people/75872> <http://purl.obolibrary.org/obo/RO_0000053> <http://sul.stanford.edu/rialto/context/roles/AdviseeRole> .
                <http://sul.stanford.edu/rialto/concepts/autoimmunity%2C_neuroimmunology%2C_immunology%2C_multiple_sclerosis%2C_Neurobiology%2C_Neuroscience%2C_Translational_Medicine%2C_Molecular_Medicine_%26_Human_Disease%2C_Immunology> <http://www.w3.org/2000/01/rdf-schema#label> "autoimmunity%2C_neuroimmunology%2C_immunology%2C_multiple_sclerosis%2C_Neurobiology%2C_Neuroscience%2C_Translational_Medicine%2C_Molecular_Medicine_%26_Human_Disease%2C_Immunology" .
                <http://sul.stanford.edu/rialto/agents/people/3784> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#FacultyMember> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_NULL_3784> <http://purl.org/dc/terms/date> "unknown/2018-08" .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_NULL_3784> <http://www.w3.org/2000/01/rdf-schema#label> "capFaculty" .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Stanford_Neurosciences_Institute_3784> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Position> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Child_Health_Research_Institute_3784> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Position> .
                <http://sul.stanford.edu/rialto/context/relationships/75872_3784> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#AdvisingRelationship> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Stanford_Neurosciences_Institute_3784> <http://purl.org/dc/terms/date> "unknown/2018-08" .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Stanford_Neurosciences_Institute_3784> <http://www.w3.org/2000/01/rdf-schema#label> "capFaculty" .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Pediatrics_3784> <http://www.w3.org/2000/01/rdf-schema#label> "capFaculty" .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Pediatrics_3784> <http://vivoweb.org/ontology/core#relates> <http://sul.stanford.edu/rialto/agents/people/3784> .
                <http://sul.stanford.edu/rialto/agents/people/75872> <http://vivoweb.org/ontology/core#relatedBy> <http://sul.stanford.edu/rialto/context/relationships/75872_3784> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Bio-X_3784> <http://vivoweb.org/ontology/core#relates> <http://sul.stanford.edu/rialto/agents/orgs/Bio-X> .
                <http://sul.stanford.edu/rialto/agents/people/3784> <http://vivoweb.org/ontology/core#relatedBy> <http://sul.stanford.edu/rialto/context/positions/capFaculty_Bio-X_3784> .
                <http://sul.stanford.edu/rialto/agents/orgs/Pediatrics> <http://vivoweb.org/ontology/core#relatedBy> <http://sul.stanford.edu/rialto/context/positions/capFaculty_Pediatrics_3784> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Neurology_3784> <http://vivoweb.org/ontology/core#relates> <http://sul.stanford.edu/rialto/agents/people/3784> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Bio-X_3784> <http://www.w3.org/2000/01/rdf-schema#label> "capFaculty" .
                <http://sul.stanford.edu/rialto/agents/people/3784> <http://vivoweb.org/ontology/core#relatedBy> <http://sul.stanford.edu/rialto/context/positions/capFaculty_NULL_3784> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Pediatrics_3784> <http://vivoweb.org/ontology/core#relates> <http://sul.stanford.edu/rialto/agents/orgs/Pediatrics> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Neurology_3784> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Position> .
                <http://sul.stanford.edu/rialto/context/names/75872> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2006/vcard/ns#Name> .
                <http://sul.stanford.edu/rialto/agents/people/3784> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
                <http://sul.stanford.edu/rialto/context/names/75872> <http://www.w3.org/2006/vcard/ns#family-name> "Or-Geva" .
                <http://sul.stanford.edu/rialto/context/roles/AdviseeRole> <http://purl.obolibrary.org/obo/RO_0000052> <http://sul.stanford.edu/rialto/agents/people/75872> .
                <http://sul.stanford.edu/rialto/agents/people/3784> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> .
                <http://sul.stanford.edu/rialto/agents/people/75872> <http://www.w3.org/2006/vcard/ns#hasName> <http://sul.stanford.edu/rialto/context/names/75872> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Bio-X_3784> <http://purl.org/dc/terms/date> "unknown/2018-08" .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Stanford_Neurosciences_Institute_3784> <http://vivoweb.org/ontology/core#relates> <http://sul.stanford.edu/rialto/agents/orgs/Stanford_Neurosciences_Institute> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Pediatrics_3784> <http://vivoweb.org/ontology/core#hrJobTitle> "George A. Zimmermann Professor and Professor of Pediatrics" .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_NULL_3784> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Position> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_NULL_3784> <http://vivoweb.org/ontology/core#hrJobTitle> "George A. Zimmermann Professor and Professor of Pediatrics" .
                <http://sul.stanford.edu/rialto/agents/orgs/Bio-X> <http://vivoweb.org/ontology/core#relatedBy> <http://sul.stanford.edu/rialto/context/positions/capFaculty_Bio-X_3784> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Child_Health_Research_Institute_3784> <http://vivoweb.org/ontology/core#relates> <http://sul.stanford.edu/rialto/agents/orgs/Child_Health_Research_Institute> .
                <http://sul.stanford.edu/rialto/agents/orgs/Stanford_Neurosciences_Institute> <http://vivoweb.org/ontology/core#relatedBy> <http://sul.stanford.edu/rialto/context/positions/capFaculty_Stanford_Neurosciences_Institute_3784> .
                <http://sul.stanford.edu/rialto/agents/people/3784> <http://vivoweb.org/ontology/core#relatedBy> <http://sul.stanford.edu/rialto/context/positions/capFaculty_Neurology_3784> .
                <http://sul.stanford.edu/rialto/context/relationships/75872_3784> <http://vivoweb.org/ontology/core#relates> <http://sul.stanford.edu/rialto/agents/people/75872> .
                <http://sul.stanford.edu/rialto/context/relationships/75872_3784> <http://vivoweb.org/ontology/core#relates> <http://sul.stanford.edu/rialto/agents/people/3784> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Child_Health_Research_Institute_3784> <http://vivoweb.org/ontology/core#relates> <http://sul.stanford.edu/rialto/agents/people/3784> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Neurology_3784> <http://www.w3.org/2000/01/rdf-schema#label> "capFaculty" .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_NULL_3784> <http://vivoweb.org/ontology/core#relates> <http://sul.stanford.edu/rialto/agents/people/3784> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Child_Health_Research_Institute_3784> <http://www.w3.org/2000/01/rdf-schema#label> "capFaculty" .
                <http://sul.stanford.edu/rialto/context/roles/AdviseeRole> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#AdviseeRole> .
                <http://sul.stanford.edu/rialto/agents/people/75872> <http://www.w3.org/2006/vcard/ns#fn> "Noga Or-Geva" .
                <http://sul.stanford.edu/rialto/context/roles/AdvisorRole> <http://purl.obolibrary.org/obo/RO_0000052> <http://sul.stanford.edu/rialto/agents/people/3784> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Bio-X_3784> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#Position> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_NULL_3784> <http://vivoweb.org/ontology/core#relates> <http://sul.stanford.edu/rialto/agents/orgs/NULL> .
                <http://sul.stanford.edu/rialto/agents/orgs/NULL> <http://vivoweb.org/ontology/core#relatedBy> <http://sul.stanford.edu/rialto/context/positions/capFaculty_NULL_3784> .
                <http://sul.stanford.edu/rialto/agents/people/3784> <http://www.w3.org/2006/vcard/ns#hasEmail> "steinman@stanford.edu" .
                <http://sul.stanford.edu/rialto/agents/people/75872> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Agent> .
                <http://sul.stanford.edu/rialto/agents/orgs/Neurology> <http://vivoweb.org/ontology/core#relatedBy> <http://sul.stanford.edu/rialto/context/positions/capFaculty_Neurology_3784> .
                <http://sul.stanford.edu/rialto/agents/people/3784> <http://purl.obolibrary.org/obo/RO_0000053> <http://sul.stanford.edu/rialto/context/roles/AdvisorRole> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Neurology_3784> <http://purl.org/dc/terms/date> "unknown/2018-08" .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Stanford_Neurosciences_Institute_3784> <http://vivoweb.org/ontology/core#hrJobTitle> "George A. Zimmermann Professor and Professor of Pediatrics" .
                <http://sul.stanford.edu/rialto/agents/people/3784> <http://vivoweb.org/ontology/core#relatedBy> <http://sul.stanford.edu/rialto/context/positions/capFaculty_Child_Health_Research_Institute_3784> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Bio-X_3784> <http://vivoweb.org/ontology/core#relates> <http://sul.stanford.edu/rialto/agents/people/3784> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Neurology_3784> <http://vivoweb.org/ontology/core#relates> <http://sul.stanford.edu/rialto/agents/orgs/Neurology> .
                <http://sul.stanford.edu/rialto/agents/people/3784> <http://vivoweb.org/ontology/core#relatedBy> <http://sul.stanford.edu/rialto/context/positions/capFaculty_Pediatrics_3784> .
                <http://sul.stanford.edu/rialto/agents/people/3784> <http://vivoweb.org/ontology/core#relatedBy> <http://sul.stanford.edu/rialto/context/positions/capFaculty_Stanford_Neurosciences_Institute_3784> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Neurology_3784> <http://vivoweb.org/ontology/core#hrJobTitle> "George A. Zimmermann Professor and Professor of Pediatrics" .
                <http://sul.stanford.edu/rialto/agents/people/75872> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Pediatrics_3784> <http://purl.org/dc/terms/date> "unknown/2018-08" .
                <http://sul.stanford.edu/rialto/agents/people/3784> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://vivoweb.org/ontology/core#NonAcademic> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Child_Health_Research_Institute_3784> <http://purl.org/dc/terms/date> "unknown/2018-08" .
                <http://sul.stanford.edu/rialto/concepts/autoimmunity%2C_neuroimmunology%2C_immunology%2C_multiple_sclerosis%2C_Neurobiology%2C_Neuroscience%2C_Translational_Medicine%2C_Molecular_Medicine_%26_Human_Disease%2C_Immunology> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2004/02/skos/core#Concept> .
                <http://sul.stanford.edu/rialto/context/positions/capFaculty_Child_Health_Research_Institute_3784> <http://vivoweb.org/ontology/core#hrJobTitle> "George A. Zimmermann Professor and Professor of Pediatrics" . } }
       WHERE {  }

The message in Cloudwatch logs:

16:46:43 START RequestId: 782fb063-9c2e-11e8-9ba2-9bed680c4a32 Version: $LATEST
16:46:43 2018/08/09 23:44:40 AFTER NEPTUNE: [
16:46:43 {
16:46:43 "type" : "UpdateEvent",
16:46:43 "totalElapsedMillis" : 26,
16:46:43 "elapsedMillis" : 24,
16:46:43 "connFlush" : 0,
16:46:43 "batchResolve" : 0,
16:46:43 "whereClause" : 11,
16:46:43 "deleteClause" : 0,
16:46:43 "insertClause" : 12
16:46:43 },
16:46:43 {
16:46:43 "type" : "Commit",
16:46:43 "totalElapsedMillis" : 36
16:46:43 }
16:46:43 ]
16:46:43 2018/08/09 23:46:43 BEFORE NEPTUNE: {0xc4200be780}
16:46:43 2018/08/09 23:46:43 AFTER NEPTUNE: [
16:46:43 {
16:46:43 "type" : "UpdateEvent",
16:46:43 "totalElapsedMillis" : 27,
16:46:43 "elapsedMillis" : 26,
16:46:43 "connFlush" : 0,
16:46:43 "batchResolve" : 0,
16:46:43 "whereClause" : 12,
16:46:43 "deleteClause" : 0,
16:46:43 "insertClause" : 13
16:46:43 },
16:46:43 {
16:46:43 "type" : "Commit",
16:46:43 "totalElapsedMillis" : 35
16:46:43 }
16:46:43 ]
16:46:43 END RequestId: 782fb063-9c2e-11e8-9ba2-9bed680c4a32
16:46:43 REPORT RequestId: 782fb063-9c2e-11e8-9ba2-9bed680c4a32 Duration: 136.05 ms Billed Duration: 200 ms Memory Size: 128 MB Max Memory Used: 38 MB
jcoyne commented 6 years ago

What does "Registering Subjects" mean? Does this mean the triples are not going into Neptune?