我在不同的csv文件中有两种类型的节点我希望每个节点都有一个唯一的ID。
我正在尝试这个:
MERGE (id:GlobalUniqueId)
ON CREATE SET id.count = 1
ON MATCH SET id.count = id.count + 1
WITH id.count AS uid
LOAD CSV WITH HEADERS FROM 'file:///C:/csv/user.csv' AS line
CREATE (:User {Id: uid, IdUser: line.idUser, ScreenName: line.screenName});
MERGE (id:GlobalUniqueId)
ON CREATE SET id.count = 1
ON MATCH SET id.count = id.count + 1
WITH id.count AS uid
LOAD CSV WITH HEADERS FROM 'file:///C:/csv/language.csv' AS line
MERGE (:Language {Id: uid, IsoLanguageCode: line.isoLanguageCode});
但是这会为所有用户节点生成相同的ID,并且对于所有语言节点,相同的标识符将增加1。 我希望每个节点都有不同的标识符吗?