diff --git a/modules/ROOT/pages/tools/neo4j-admin/neo4j-admin-import.adoc b/modules/ROOT/pages/tools/neo4j-admin/neo4j-admin-import.adoc index 01b1a50a6..07445b5c9 100644 --- a/modules/ROOT/pages/tools/neo4j-admin/neo4j-admin-import.adoc +++ b/modules/ROOT/pages/tools/neo4j-admin/neo4j-admin-import.adoc @@ -1441,6 +1441,34 @@ neo4j_home$ --nodes persons.csv --nodes games.csv --id-type string 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. ==== +[role=label--new-5.26] +[[import-tool-actions-csv-files]] +== Updating data using actions in CSV files + +You can use actions in CSV files to update data during incremental import. +This feature is especially useful when you want to update existing nodes or relationships in large datasets. + +In the header file, you can specify whether an action should be taken for the data in the fields using the `:ACTION` keyword. +If no action is specified, the import tool works as in full import mode, creating new data. + +The following actions are supported: + +* `empty` = `CREATE` (default) +* `C`, `CREATE` - Creates a new entity. +* `U`, `UPDATE` - Updates an existing entity. +* `D`, `DELETE` - Deletes an existing entity. +Deleting a node also deletes its relationships (`DETACH DELETE`). + +On each row in the data file, you can specify the action for the data in the fields. + +.Using actions in CSV files to update data +[source, cypher, role="nocopy"] +---- +:ACTION,personId:ID,name,:LABEL +CREATE,1,"Keanu Reeves",Actor +UPDATE,2,"Laurence Fishburne",Actor +DELETE,4 +---- == Importing data that spans multiple lines