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.
1410
1413
====
1411
1414
1415
+
[role=label--new-2025.01.0]
1416
+
== Applying changes to data via CSV files
1417
+
1418
+
You can use CSV files to update existing nodes, relationships, labels, or properties during incremental import.
1419
+
1420
+
[NOTE]
1421
+
====
1422
+
This feature is supported only by `block` format.
1423
+
====
1424
+
1425
+
=== Set an explicit action for each row
1426
+
1427
+
You can set an explicit action for each row in the CSV file by using the `:ACTION` keyword in the header file.
1428
+
If no action is specified, the import tool works as in full import mode, creating new data.
1429
+
1430
+
The following actions are supported:
1431
+
1432
+
* `empty` = `CREATE` (default)
1433
+
* `C`, `CREATE` - Creates new nodes and relationships, with or without properties, as well as labels.
* `D`, `DELETE` - Deletes existing nodes or relationships.
1436
+
Deleting a node also deletes its relationships (`DETACH DELETE`).
1437
+
1438
+
1439
+
.Using actions in CSV files to update nodes
1440
+
[source, cypher, role="nocopy"]
1441
+
----
1442
+
:ACTION,uid:ID(label:Person),name,:LABEL
1443
+
CREATE,person1,"Keanu Reeves",Actor
1444
+
UPDATE,person2,"Laurence Fishburne",Actor
1445
+
DELETE,person4,,
1446
+
----
1447
+
1448
+
Nodes are identified by their unique property value for the key/label combination that the header specifies.
1449
+
1450
+
.Using actions in CSV files to update relationships
1451
+
[source, cypher, role="nocopy"]
1452
+
----
1453
+
:ACTION,:START_ID,:END_ID,:TYPE,role
1454
+
CREATE,person1,movie1,ACTED_IN,"Neo"
1455
+
UPDATE,person2,movie1,ACTED_IN,"Morpheus"
1456
+
DELETE,person3,movie1,ACTED_IN
1457
+
----
1458
+
1459
+
Relationships are identified non-uniquely by their start and end node IDs, and their type.
1460
+
1461
+
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).
1462
+
1463
+
.Using actions in CSV files to update relationships with identifier properties
0 commit comments