Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions modules/ROOT/pages/tools/neo4j-admin/neo4j-admin-import.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down