Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-17-2018 11:18 AM
Hi All,
I am trying to create a node in neo4j browser and however I am not able to create nodes,
Below is the query I executed,
LOAD CSV WITH HEADERS FROM "file:///email_logs.csv" AS row
MERGE (p1:Username {mail_id: row.sender})
MERGE (p2:Username {mail_id: row.recipient})
MERGE (p3:Topic {topic: row.keywords})
MERGE (p4:Subject {subject: row.message})
WITH p1, p2, p3, p4, row, COUNT(*) AS count
MERGE (p1)-[rel:sent]->(p2) ON CREATE SET rel.timestamp = row.date_time
MERGE (p1)-[int:interest]->(p3)<-[:interest]-(p2) ON CREATE SET int.Topic = row.keywords
MERGE (p1)-[sub:subject]->(p4)<-[:subject]-(p2) ON CREATE SET sub.subject = row.message
SET rel.count = count
After executing the query, In neo4j browser "Subject" node is not created and there is no error and below is the response I got,
Please correct me If I am doing anything wrong in the cypher query.
Thanks,
Ganeshbabu R
Solved! Go to Solution.
09-18-2018 11:44 AM
I created indexes on the labels and then I tried uploading the data to neo4j and got succeeded.. Now all the labels with properties are created.
Regards,
Ganeshbabu R
09-17-2018 12:34 PM
What happens if you run this?
MATCH (s:Subject)
RETURN count(s)
Also that load is taking a long time. Have you created indexes or unique constraints on the various label/properties to speed up those merges?
09-17-2018 04:34 PM
Please also share an EXPLAIN
of your query and the first few lines of your CSV file.
e.g.
LOAD CSV WITH HEADERS FROM "file:///email_logs.csv" AS row
RETURN row limit 5
09-18-2018 11:44 AM
I created indexes on the labels and then I tried uploading the data to neo4j and got succeeded.. Now all the labels with properties are created.
Regards,
Ganeshbabu R
All the sessions of the conference are now available online