How can insert/update (upsert) data into Neptune opencypher?

0

I have loaded few nodes into Neptune using following code in databricks

nep_client.start_loader_job( source='s3://bucket/Test.csv', format='opencypher', s3BucketRegion='us-east-1', iamRoleArn='arn:aws:iam::12345678:role/NeptuneLoadFromS3' , mode='AUTO', failOnError=False, parallelism='MEDIUM', queueRequest=True )

Now I added a new property in Test.csv nodes and i want to load the data in upsert way. i.e., If the node ID already exists it should update the existing properties, otherwise insert the data into Neptune.

I need to know the possible ways to perform upsert into neptune using python/pyspark or any other way.

Sid
asked 2 months ago315 views
1 Answer
1

Hello,

According to this stackoverflow, it is possible to do this via the Loader command: https://stackoverflow.com/questions/63425245/can-we-update-the-property-of-existing-nodes-and-edges-of-a-graph-in-aws-neptune

However, this is only works in the case where properties are of single cardinality.

Please refer to the following documentation for more information on this: https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-gremlin.html

AWS
SUPPORT ENGINEER
answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions