Created
December 1, 2014 09:57
-
-
Save vranac/d6aeb1eae81c65a78f59 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE CONSTRAINT ON (deal:Deal) ASSERT deal.id IS UNIQUE; | |
USING PERIODIC COMMIT 5000 | |
LOAD CSV WITH HEADERS FROM "file:///Users/vranac/dev/deals/temp/deals_100k.csv" AS row | |
WITH row | |
MERGE (d:Deal {Id: row.id}) | |
ON CREATE SET d.Id = row.id, | |
d.a = row.a, | |
d.b = row.b, | |
// 2014-12-05, | |
d.c = row.c, | |
// 2014-12-10 | |
d.d = row.d, | |
d.e = row.e, | |
d.f = row.f, | |
d.g = row.g, | |
d.h = row.h | |
ON MATCH SET d.a = row.a, | |
d.b = row.b, | |
// 2014-12-05, | |
d.c = row.c, | |
// 2014-12-10 | |
d.d = row.d, | |
d.e = row.e, | |
d.f = row.f, | |
d.g = row.g, | |
d.h = row.h | |
; | |
Result: | |
+-------------------+ | |
| No data returned. | | |
+-------------------+ | |
Nodes created: 90000 | |
Properties set: 980000 | |
Labels added: 90000 | |
41122902 ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment