How to create Node with unique Id ?

491 views
Skip to first unread message

Stephen

unread,
Sep 17, 2017, 8:17:54 PM9/17/17
to Neo4j
When I was using "neo4j-import" to import csv file. There was a name like "PRODUCT_ID:ID" that I can specify a unique value to a node , and I can build a relationship between 2 nodes with these values.
Now I want to use cypher or java code to create node like above. How to do it?

Reference of csv-import info : https://neo4j.com/developer/guide-import-csv/

Michael Hunger

unread,
Sep 17, 2017, 8:20:19 PM9/17/17
to ne...@googlegroups.com
You can use load csv to load data from CSV

Or in cypher or the java API create a node and set PRODUCT_ID as a property with your value (you should use a name like productId though for better readability).

If you need to create UUIDs you can use the APOC procedure library and use apoc.create.uuid() function.

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages