I have the following import:
// NO ATTACHMENT OR LINK
USING PERIODIC COMMIT 1000
LOAD CSV WITH HEADERS FROM ("file:///sessions/Hourly_Parsed/2019-12-10_00_hourly_parsed_mail_logs.csv") AS row
MERGE (a:Sender { name: row.From, domain: row.Sender_Sub_Fld, datetime: datetime(replace(row.DateTime, ' ', 'T'))})
MERGE (b:Recipient { name: row.To, datetime: datetime(replace(row.DateTime, ' ', 'T'))})
WITH a,b,row
WHERE row.Url = "false" AND row.FileHash = "false"
CALL apoc.merge.relationship(a, row.Outcome2, {}, {}, b) YIELD rel as rel1
RETURN a,b
As you can see I have added the datetime property to both the Sender
and Recipient
nodes. I would like to add this property to the relationship. The problem that I am running into is that my property is created using apoc.merge.relationship()
so that I can create the name based on the outcome in the rows column.
Can I add something below the CALL
portion to add the datetime: datetime(replace(row.DateTime, ' ', 'T'))
as a property to the relationship?