Skip to content

Commit ae80cfd

Browse files
Clarify the difference between the full and incremental import (#3085)
Co-authored-by: Reneta Popova <reneta.popova@neo4j.com>
1 parent 0191a67 commit ae80cfd

5 files changed

Lines changed: 494 additions & 270 deletions

File tree

modules/ROOT/pages/import.adoc

Lines changed: 89 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ See <<import-logs, Import progress reporting>> for more details.
5858
[TIP]
5959
====
6060
For information on `LOAD CSV`, see the link:{neo4j-docs-base-uri}/cypher-manual/current/clauses/load-csv[Cypher Manual -> `LOAD CSV`].
61-
For in-depth examples of using the command `neo4j-admin database import`, refer to the xref:tutorial/neo4j-admin-import.adoc[Tutorials -> Importing data].
61+
For in-depth examples of using the command `neo4j-admin database import full`, refer to the xref:tutorial/neo4j-admin-import.adoc[Tutorials -> Full data import].
6262
====
6363

6464
[[import-memory-controls]]
@@ -545,7 +545,8 @@ This is achieved by using the `format` option of the import command and setting
545545
546546
[source, shell]
547547
--
548-
bin/neo4j-admin database import full --format=block
548+
bin/neo4j-admin database import full \
549+
--format=block
549550
--
550551
551552
The `block` format is available in Enterprise Edition only.
@@ -560,7 +561,9 @@ For example, the following command:
560561
561562
[source, shell]
562563
----
563-
bin/neo4j-admin database import full @/path/to/your/<args-filename> mydb
564+
bin/neo4j-admin database import full \
565+
@/path/to/your/<args-filename> \
566+
databasename
564567
----
565568
For more information, see link:https://picocli.info/#AtFiles[Picocli -> AtFiles] official documentation.
566569
====
@@ -615,9 +618,11 @@ The command does not write any data to the database.
615618

616619
[source, shell, role=noplay]
617620
----
618-
bin/neo4j-admin database import full --dry-run=true --nodes import/movies_header.csv,import/movies.csv \
619-
--nodes import/actors_header.csv,import/actors.csv \
620-
--relationships import/roles_header.csv,import/roles.csv
621+
bin/neo4j-admin database import full \
622+
--dry-run=true \
623+
--nodes=import/movies_header.csv,import/movies.csv \
624+
--nodes=import/actors_header.csv,import/actors.csv \
625+
--relationships=import/roles_header.csv,import/roles.csv
621626
----
622627

623628
.Example output
@@ -663,9 +668,10 @@ The following command imports the three datasets:
663668

664669
[source, shell, role=noplay]
665670
----
666-
bin/neo4j-admin database import full --nodes import/movies_header.csv,import/movies.csv \
667-
--nodes import/actors_header.csv,import/actors.csv \
668-
--relationships import/roles_header.csv,import/roles.csv
671+
bin/neo4j-admin database import full \
672+
--nodes=import/movies_header.csv,import/movies.csv \
673+
--nodes=import/actors_header.csv,import/actors.csv \
674+
--relationships=import/roles_header.csv,import/roles.csv
669675
----
670676

671677
[[import-tool-multiple-input-files-regex-example]]
@@ -679,7 +685,8 @@ For example:
679685

680686
[source, shell, role=noplay]
681687
----
682-
bin/neo4j-admin database import full --nodes import/node_header.csv,import/node_data_\d+\.csv
688+
bin/neo4j-admin database import full \
689+
--nodes=import/node_header.csv,import/node_data_\d+\.csv
683690
----
684691

685692
[NOTE]
@@ -697,7 +704,9 @@ For example:
697704

698705
[source, shell, role=noplay]
699706
----
700-
bin/neo4j-admin database import full --nodes import/node_header.csv,'import/node_data_\d{1,5}.csv' databasename
707+
bin/neo4j-admin database import full \
708+
--nodes=import/node_header.csv,'import/node_data_\d{1,5}.csv' \
709+
databasename
701710
----
702711

703712
[[import-files-from-cloud-storage]]
@@ -722,7 +731,10 @@ The example assumes that you have data stored in the `myBucket/data` folder in y
722731
+
723732
[source, shell, role=noplay]
724733
----
725-
bin/neo4j-admin database import full --nodes s3://myBucket/data/nodes.csv --relationships s3://myBucket/data/relationships.csv newdb
734+
bin/neo4j-admin database import full \
735+
--nodes=s3://myBucket/data/nodes.csv \
736+
--relationships=s3://myBucket/data/relationships.csv \
737+
databasename
726738
----
727739
======
728740
@@ -736,7 +748,10 @@ The example assumes that you have data stored in the `myBucket/data` folder in y
736748
+
737749
[source,shell]
738750
----
739-
bin/neo4j-admin database import full --nodes gs://myBucket/data/nodes.csv --relationships gs://myBucket/data/relationships.csv newdb
751+
bin/neo4j-admin database import full \
752+
--nodes=gs://myBucket/data/nodes.csv \
753+
--relationships=gs://myBucket/data/relationships.csv \
754+
databasename
740755
----
741756
======
742757
@@ -750,7 +765,10 @@ The example assumes that you have data stored in the `myStorageAccount/myContain
750765
+
751766
[source,shell]
752767
----
753-
bin/neo4j-admin database import full --nodes azb://myStorageAccount/myContainer/data/nodes.csv --relationships azb://myStorageAccount/myContainer/data/relationships.csv newdb
768+
bin/neo4j-admin database full \
769+
--nodes=azb://myStorageAccount/myContainer/data/nodes.csv \
770+
--relationships=azb://myStorageAccount/myContainer/data/relationships.csv \
771+
databasename
754772
----
755773
======
756774
=====
@@ -1264,7 +1282,11 @@ The command does not write any data to the database.
12641282
----
12651283
neo4j@system> STOP DATABASE neo4j WAIT;
12661284
...
1267-
bin/neo4j-admin database import incremental --dry-run=true --nodes=N1=../../raw-data/incremental-import/nodes.csv --relationships=R1=../../raw-data/incremental-import/relationships.csv neo4j
1285+
bin/neo4j-admin database import incremental \
1286+
--dry-run=true \
1287+
--nodes=N1=../../raw-data/incremental-import/nodes.csv \
1288+
--relationships=R1=../../raw-data/incremental-import/relationships.csv \
1289+
neo4j
12681290
----
12691291

12701292
.Example output
@@ -1314,7 +1336,11 @@ This option requires the database to be stopped.
13141336
----
13151337
neo4j@system> STOP DATABASE neo4j WAIT;
13161338
...
1317-
bin/neo4j-admin database import incremental --stage=all --nodes=N1=../../raw-data/incremental-import/nodes.csv --relationships=R1=../../raw-data/incremental-import/relationships.csv neo4j
1339+
bin/neo4j-admin database import incremental \
1340+
--stage=all \
1341+
--nodes=N1=../../raw-data/incremental-import/nodes.csv \
1342+
--relationships=R1=../../raw-data/incremental-import/relationships.csv \
1343+
neo4j
13181344
----
13191345

13201346
[[incremental-import-stages]]
@@ -1338,7 +1364,11 @@ STOP DATABASE neo4j WAIT
13381364
+
13391365
[source, shell, role=noplay]
13401366
----
1341-
bin/neo4j-admin database import incremental --stage=prepare --nodes=N1=../../raw-data/incremental-import/nodes.csv --relationships=R1=../../raw-data/incremental-import/relationships.csv neo4j
1367+
bin/neo4j-admin database import incremental \
1368+
--stage=prepare \
1369+
--nodes=N1=../../raw-data/incremental-import/nodes.csv \
1370+
--relationships=R1=../../raw-data/incremental-import/relationships.csv \
1371+
neo4j
13421372
----
13431373
. `build` stage:
13441374
+
@@ -1356,7 +1386,11 @@ ALTER DATABASE neo4j SET ACCESS READ ONLY
13561386
+
13571387
[source, shell, role=noplay]
13581388
----
1359-
bin/neo4j-admin database import incremental --stage=build --nodes=N1=../../raw-data/incremental-import/nodes.csv --relationships=R1=../../raw-data/incremental-import/relationships.csv neo4j
1389+
bin/neo4j-admin database import incremental \
1390+
--stage=build \
1391+
--nodes=N1=../../raw-data/incremental-import/nodes.csv \
1392+
--relationships=R1=../../raw-data/incremental-import/relationships.csv \
1393+
neo4j
13601394
----
13611395
. `merge` stage:
13621396
+
@@ -1375,7 +1409,9 @@ STOP DATABASE neo4j WAIT
13751409
+
13761410
[source, shell, role=noplay]
13771411
----
1378-
bin/neo4j-admin database import incremental --stage=merge neo4j
1412+
bin/neo4j-admin database import incremental \
1413+
--stage=merge \
1414+
neo4j
13791415
----
13801416

13811417
[[import-tool-header-format]]
@@ -2095,7 +2131,10 @@ For example:
20952131

20962132
[source, shell, role=noplay]
20972133
----
2098-
bin/neo4j-admin database import full --nodes import/node_header.csv,import/node_data.csv --multiline-fields=true databasename
2134+
bin/neo4j-admin database import full \
2135+
--nodes=import/node_header.csv,import/node_data.csv \
2136+
--multiline-fields=true \
2137+
databasename
20992138
----
21002139

21012140
Where `import/node_data.csv` contains multiline fields, such as:
@@ -2131,7 +2170,11 @@ For example:
21312170
======
21322171
[source, shell, role=noplay]
21332172
----
2134-
bin/neo4j-admin database import full --nodes import/node_header.csv,import/node_data.csv --multiline-fields=true --multiline-fields-format=v1 databasename
2173+
bin/neo4j-admin database import full \
2174+
--nodes=import/node_header.csv,import/node_data.csv \
2175+
--multiline-fields=true \
2176+
--multiline-fields-format=v1 \
2177+
databasename
21352178
----
21362179

21372180
Where `import/node_data.csv` contains multiline fields, such as:
@@ -2148,7 +2191,11 @@ description
21482191

21492192
[source, shell, role=noplay]
21502193
----
2151-
bin/neo4j-admin database import full --nodes import/node_header.csv,import/node_data.csv --multiline-fields=import/node_data.csv --multiline-fields-format=v2 databasename
2194+
bin/neo4j-admin database import full \
2195+
--nodes=import/node_header.csv,import/node_data.csv \
2196+
--multiline-fields=import/node_data.csv \
2197+
--multiline-fields-format=v2 \
2198+
databasename
21522199
----
21532200

21542201
Where `import/node_data.csv` contains multiline fields, such as:
@@ -2208,7 +2255,10 @@ actors-header.csv actors.csv.zip movies-header.csv movies.csv.gz roles-heade
22082255
22092256
[source, sh]
22102257
----
2211-
bin/neo4j-admin database import full --nodes import/movies-header.csv,import/movies.csv.gz --nodes import/actors-header.csv,import/actors.csv.zip --relationships import/roles-header.csv,import/roles.csv.gz
2258+
bin/neo4j-admin database import full \
2259+
--nodes=import/movies-header.csv,import/movies.csv.gz \
2260+
--nodes=import/actors-header.csv,import/actors.csv.zip \
2261+
--relationships=import/roles-header.csv,import/roles.csv.gz
22122262
----
22132263
====
22142264

@@ -2325,7 +2375,12 @@ Then, use the following example commands to run the import:
23252375

23262376
[source, shell, role=noplay]
23272377
----
2328-
bin/neo4j-admin database import full neo4j --nodes=import/movies.csv --nodes=import/actors.csv --relationships=import/roles.csv --schema=import/schema.cypher
2378+
bin/neo4j-admin database import full \
2379+
--nodes=import/movies.csv \
2380+
--nodes=import/actors.csv \
2381+
--relationships=import/roles.csv \
2382+
--schema=import/schema.cypher \
2383+
neo4j
23292384
----
23302385

23312386
[role=label--new-2026.02]
@@ -2395,7 +2450,12 @@ Then, use the following example commands to run the import:
23952450

23962451
[source, shell, role=noplay]
23972452
----
2398-
bin/neo4j-admin database import incremental --stage=all --nodes=import/movies.csv --nodes=import/actors.csv --relationships=import/roles.csv --schema=import/schema.cypher
2453+
bin/neo4j-admin database import incremental \
2454+
--stage=all \
2455+
--nodes=import/movies.csv \
2456+
--nodes=import/actors.csv \
2457+
--relationships=import/roles.csv \
2458+
--schema=import/schema.cypher
23992459
----
24002460

24012461
[role=label--enterprise-edition]
@@ -2421,9 +2481,10 @@ For example:
24212481
.Run a full import with JFR recording
24222482
[source, shell, role=noplay]
24232483
----
2424-
bin/neo4j-admin database import full --nodes import/movies_header.csv,import/movies.csv \
2425-
--nodes import/actors_header.csv,import/actors.csv \
2426-
--relationships import/roles_header.csv,import/roles.csv \
2484+
bin/neo4j-admin database import full \
2485+
--nodes=import/movies_header.csv,import/movies.csv \
2486+
--nodes=import/actors_header.csv,import/actors.csv \
2487+
--relationships=import/roles_header.csv,import/roles.csv \
24272488
--profile=true
24282489
----
24292490

modules/ROOT/pages/tutorial/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The following step-by-step tutorials cover common operational tasks or otherwise
77

88
//* <<tutorial-local-cluster, Set up a local Causal Cluster>> -- This tutorial walks through the basics of setting up a Neo4j Causal Cluster.
99
//* <<tutorial-cc-backup-restore-db, Back up and restore a database in Causal Cluster>> -- This tutorial provides a detailed example of how to back up and restore a database in a running Causal Cluster.
10-
* xref:tutorial/neo4j-admin-import.adoc[Importing data] -- This tutorial provides detailed examples to illustrate the capabilities of importing data from CSV files with the command `neo4j-admin database import`.
10+
* xref:tutorial/neo4j-admin-import.adoc[Full data import] -- Examples of importing data from CSV files using the `neo4j-admin database import full` command.
1111
* xref:tutorial/tutorial-composite-database.adoc[Setting up and using a composite database] -- This tutorial walks through the basics of setting up and using Composite databases.
1212
* xref:tutorial/access-control.adoc[Fine-grained access control] -- This tutorial presents an example that illustrates various aspects of security and fine-grained access control.
1313
* xref:tutorial/tutorial-sso-configuration.adoc[Configuring Neo4j Single Sign-On (SSO)] -- Examples and solutions to common problems when configuring SSO.

0 commit comments

Comments
 (0)