You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `id` property of the nodes in the `persons` group will be stored as `long` type, while the `id` property of the nodes in the `games` group will be stored as `string` type, as the global `id-type` is a string.
1424
1427
====
1425
1428
1429
+
[role=label--new-2025.01.0]
1430
+
== Applying changes to data via CSV files
1431
+
1432
+
You can use CSV files to update existing nodes, relationships, labels, or properties during incremental import.
1433
+
1434
+
[NOTE]
1435
+
====
1436
+
This feature is supported only by `block` format.
1437
+
====
1438
+
1439
+
=== Set an explicit action for each row
1440
+
1441
+
You can set an explicit action for each row in the CSV file by using the `:ACTION` keyword in the header file.
1442
+
If no action is specified, the import tool works as in full import mode, creating new data.
1443
+
1444
+
The following actions are supported:
1445
+
1446
+
* `empty` = `CREATE` (default)
1447
+
* `C`, `CREATE` - Creates new nodes and relationships, with or without properties, as well as labels.
* `D`, `DELETE` - Deletes existing nodes or relationships.
1450
+
Deleting a node also deletes its relationships (`DETACH DELETE`).
1451
+
1452
+
1453
+
.Using actions in CSV files to update nodes
1454
+
[source, cypher, role="nocopy"]
1455
+
----
1456
+
:ACTION,uid:ID(label:Person),name,:LABEL
1457
+
CREATE,person1,"Keanu Reeves",Actor
1458
+
UPDATE,person2,"Laurence Fishburne",Actor
1459
+
DELETE,person4,,
1460
+
----
1461
+
1462
+
Nodes are identified by their unique property value for the key/label combination that the header specifies.
1463
+
1464
+
.Using actions in CSV files to update relationships
1465
+
[source, cypher, role="nocopy"]
1466
+
----
1467
+
:ACTION,:START_ID,:END_ID,:TYPE,role
1468
+
CREATE,person1,movie1,ACTED_IN,"Neo"
1469
+
UPDATE,person2,movie1,ACTED_IN,"Morpheus"
1470
+
DELETE,person3,movie1,ACTED_IN
1471
+
----
1472
+
1473
+
Relationships are identified non-uniquely by their start and end node IDs, and their type.
1474
+
1475
+
To further narrow down selection you can tag a property column as an identifier to help out in selecting relationships uniquely (or at least more uniquely).
1476
+
1477
+
.Using actions in CSV files to update relationships with identifier properties
0 commit comments