Skip to content

Commit 2f3b2ca

Browse files
Add tabbed examples for multiple node IDs (#2512)
The Operations manual covers all releases of 2025.xx series. That's why we cannot simply replace examples with new ones, as new functionality has been added. We also need to retain examples for earlier versions of Neo4j.
1 parent 495aa87 commit 2f3b2ca

File tree

1 file changed

+67
-15
lines changed

1 file changed

+67
-15
lines changed

modules/ROOT/pages/import.adoc

Lines changed: 67 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,39 +1464,66 @@ Now use the previously defined ID spaces when connecting the actors to movies.
14641464
== Using multiple node IDs
14651465

14661466
A node header can contain multiple `ID` columns.
1467-
The relationship data must then use a matching number of `START_ID` / `END_ID` columns as references to the composite value of those ID columns.
1467+
1468+
Starting from 2025.07, the relationship data must then use a matching number of `START_ID` / `END_ID` columns as references to the composite value of those ID columns.
14681469
This implies using `string` as `id-type`.
14691470

14701471
For each `ID` column, you can specify to store its values as different node properties.
14711472
However, the composite value cannot be stored as a node property.
14721473

1473-
[NOTE]
1474+
[IMPORTANT]
14741475
====
14751476
Incremental import doesn't support the use of multiple node identifiers.
14761477
This functionality is only available with a full import.
14771478
====
14781479

14791480

1480-
.Define multiple IDs as node properties
1481-
====
1482-
You can define multiple `ID` columns in the node header.
1483-
For example, you can define a node header with two `ID` columns.
1481+
=== Define multiple IDs as node properties
14841482

1483+
. Define multiple `ID` columns in the node header.
1484+
+
14851485
.nodes_header.csv
14861486
[source, csv]
14871487
----
14881488
:ID,:ID,name
14891489
----
1490-
1490+
+
14911491
.nodes.csv
14921492
[source, csv]
14931493
----
14941494
aa,11,John
14951495
bb,22,Paul
14961496
----
14971497

1498+
. Define the relationship between two established nodes.
1499+
+
1500+
[.tabbed-example]
1501+
=====
1502+
[role=include-with-single-ID-column]
1503+
======
1504+
14981505
Now use both IDs when defining the relationship:
14991506

1507+
.relationships_header.csv
1508+
[source, csv]
1509+
----
1510+
:START_ID,:TYPE,:END_ID
1511+
----
1512+
1513+
.relationships.csv
1514+
[source, csv]
1515+
----
1516+
aa11,WORKS_WITH,bb22
1517+
----
1518+
1519+
======
1520+
[role=include-with-multiple-ID-columns label--new-2025.07]
1521+
======
1522+
1523+
Starting from 2025.07, you can use a matching number of `START_ID` / `END_ID` columns when defining the relationship.
1524+
However, do not mix how to refer to composite IDs.
1525+
Either all references must use a single `START_ID` / `END_ID` column or all references must use a matching number of them.
1526+
15001527
.relationships_header.csv
15011528
[source, csv]
15021529
----
@@ -1508,28 +1535,51 @@ Now use both IDs when defining the relationship:
15081535
----
15091536
aa,11,WORKS_WITH,bb,22
15101537
----
1511-
====
1538+
======
1539+
=====
15121540

15131541
[[multiple-IDs-Id-spaces]]
1514-
.Define multiple IDs stored in ID spaces
1515-
====
1516-
1517-
Define a `MyGroup` ID space in the _nodes_header.csv_ file.
1542+
=== Define multiple IDs stored in ID spaces
15181543

1544+
. Define a `MyGroup` ID space in the _nodes_header.csv_ file.
1545+
+
15191546
.nodes_header.csv
15201547
[source, csv]
15211548
----
15221549
personId:ID(MyGroup),memberId:ID(MyGroup),name
15231550
----
1524-
1551+
+
15251552
.nodes.csv
15261553
[source, csv]
15271554
----
15281555
aa,11,John
15291556
bb,22,Paul
15301557
----
15311558

1532-
Now use the defined ID space when connecting John with Paul, and use both IDs in the relationship.
1559+
. Now use the defined ID space when connecting John with Paul, and use both IDs in the relationship.
1560+
+
1561+
[.tabbed-example]
1562+
=====
1563+
[role=include-with-single-ID-column]
1564+
======
1565+
1566+
.relationships_header.csv
1567+
[source, csv]
1568+
----
1569+
:START_ID(MyGroup),:TYPE,:END_ID(MyGroup)
1570+
----
1571+
1572+
.relationships.csv
1573+
[source, csv]
1574+
----
1575+
aa11,WORKS_WITH,bb22
1576+
----
1577+
1578+
======
1579+
[role=include-with-multiple-ID-columns label--new-2025.07]
1580+
======
1581+
1582+
Starting from 2025.07, you have to use a matching number of `START_ID` / `END_ID` columns when defining the relationship:
15331583

15341584
.relationships_header.csv
15351585
[source, csv]
@@ -1542,7 +1592,9 @@ Now use the defined ID space when connecting John with Paul, and use both IDs in
15421592
----
15431593
aa,11,WORKS_WITH,bb,22
15441594
----
1545-
====
1595+
======
1596+
=====
1597+
15461598

15471599
[[import-tool-id-types-header]]
15481600
== Storing a different value type for IDs in a group

0 commit comments

Comments
 (0)