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
已提問 3 個月前檢視次數 345 次
1 個回答
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
支援工程師
已回答 3 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南