I would like to create/overwrite relationships between two nodes based on relationship key by using Neo4J Spark. I understand that Neo4J Spark provide source node key & target node key but do not have relationship key which i can't create/overwrite relationships between two nodes based on relationship key.
Below is the sample data model:
Scenario
Source database
row 1: Customer A bought a Product: Pen by quantity: 10 at 25 Sept 2024
row 2: Customer A bought a Product: Pen by quantity: 15 at 26 Sept 2024
Both row import into Neo4J Graph with relationship: HAS_BOUGHT, properties: quantity, transaction_date
Source database updated row 1 quantity from 10 to 12
row 1: Customer A bought a Product: Pen by quantity: 12 at 25 Sept 2024
row 2: Customer A bought a Product: Pen by quantity: 15 at 26 Sept 2024
I can't update row1 using Spark Neo4j into Neo4J Graph since there are no relationship key to specify for relationship update. i understand we can add transaction node as composite node between Customer & Product but i don't want make the data model complex. I need relationship as transaction records.
Thanks