Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Neptune bulk delete data

I want to bulk delete nodes in the same way we can bulk load data using a curl operation in AWS Neptune. Is there an API convention for gremlin like I see for SPARQL? If so can you please post reference?

If there is no bulk delete via the API, how feasible is it to bulk delete with the gremlin python sdk?

like image 302
Justin Gerard Avatar asked Jan 25 '23 06:01

Justin Gerard


1 Answers

There is an example of how to delete a graph using multi threaded Python at this location. The code could be further improved to work with very large graphs. That is discussed in the comments. I have successfully deleted graphs with 20+ million vertices using this code.

https://github.com/awslabs/amazon-neptune-tools/tree/master/drop-graph

EDITED 2021-11-17 If you want to delete everything, Amazon Neptune now provides a "fast reset" API that allows you to efficiently delete all the data in a cluster.

https://docs.aws.amazon.com/neptune/latest/userguide/manage-console-fast-reset.html

like image 122
Kelvin Lawrence Avatar answered Feb 14 '23 03:02

Kelvin Lawrence