Skip to content

Instantly share code, notes, and snippets.

View agcunha's full-sized avatar
🎯
Focusing

Anderson Cunha agcunha

🎯
Focusing
  • Statkraft Energias Renováveis
  • Florianópolis
View GitHub Profile
@tomsaleeba
tomsaleeba / README.md
Created May 15, 2018 08:01
Deleting batches of records with SPARQL

I learned this when trying to clear our records in AWS Neptune. I was hitting the query timeout when trying to drop an entire graph. If you don't want to/can't raise the timeout, you can drop smaller parts of the graph in each transaction.

curl -sX POST http://<cluster-prefix>.rds.amazonaws.com:8182/sparql --data-urlencode 'update=
DELETE {
  GRAPH <http://aws.amazon.com/neptune/vocab/v01/DefaultNamedGraph> { ?s ?p ?o }
}
WHERE {
  GRAPH <http://aws.amazon.com/neptune/vocab/v01/DefaultNamedGraph> {
 {