Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[csv-to-neptune-bulk-format] : upsert #280

Open
chetanpatilofficial opened this issue Dec 23, 2022 · 1 comment
Open

[csv-to-neptune-bulk-format] : upsert #280

chetanpatilofficial opened this issue Dec 23, 2022 · 1 comment

Comments

@chetanpatilofficial
Copy link

chetanpatilofficial commented Dec 23, 2022

I have a scenario where I want to upsert the node properties whenever we have multiple record with same key but change in property values. I tried to test this scenario by modifying the Spotify dataset(modified track_popularity) like below for Track Node:
image

But as this is a duplicate record as per the uniqueKey, final Track.csv is not generating both the record.

Is there anyway using csv-to-neptune-bulk-format utility i can upsert if same uniqueKey record present in incoming data csv ?

@triggan
Copy link
Contributor

triggan commented Dec 27, 2022

You can use the bulk loader for upserts under two conditions:

  • The value for a given property is of single cardinality [1]
  • The bulk load request is submitted with the updateSingleCardinalityProperties parameter set to TRUE [2]

You would also need to change the csv-to-neptune config file so that the properties that you want to update are single cardinality (or, isMultiValue = false).

[1] https://docs.aws.amazon.com/neptune/latest/userguide/bulk-load-tutorial-format-gremlin.html#bulk-load-tutorial-format-gremlin-propheaders
[2] https://docs.aws.amazon.com/neptune/latest/userguide/load-api-reference-load.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants