From 2b7a92cafaf7bcc9fe9d47131af0d52691dfe266 Mon Sep 17 00:00:00 2001 From: Natalia Ivakina Date: Wed, 30 Jul 2025 15:23:36 +0200 Subject: [PATCH 1/8] Add tabbed examples for multiple node IDs --- modules/ROOT/pages/import.adoc | 74 +++++++++++++++++++++++++--------- 1 file changed, 56 insertions(+), 18 deletions(-) diff --git a/modules/ROOT/pages/import.adoc b/modules/ROOT/pages/import.adoc index abcbc78bf..785792151 100644 --- a/modules/ROOT/pages/import.adoc +++ b/modules/ROOT/pages/import.adoc @@ -1464,22 +1464,24 @@ Now use the previously defined ID spaces when connecting the actors to movies. == Using multiple node IDs A node header can contain multiple `ID` columns. -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. + +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. This implies using `string` as `id-type`. For each `ID` column, you can specify to store its values as different node properties. However, the composite value cannot be stored as a node property. -[NOTE] +[IMPORTANT] ==== Incremental import doesn't support the use of multiple node identifiers. This functionality is only available with a full import. ==== -.Define multiple IDs as node properties -==== +=== Define multiple IDs as node properties + You can define multiple `ID` columns in the node header. + For example, you can define a node header with two `ID` columns. .nodes_header.csv @@ -1495,54 +1497,90 @@ aa,11,John bb,22,Paul ---- +[.tabbed-example] +===== +[role=include-with-multiple-node-IDs] +====== + Now use both IDs when defining the relationship: -.relationships_header.csv +[source, csv] +---- +:START_ID,:TYPE,:END_ID +---- + +[source, csv] +---- +aa11,WORKS_WITH,bb22 +---- + +====== +[role=include-with-multiple-IDs label--new-2025.07] +====== + +Starting from 2025.07, you can use multiple IDs when defining the relationship: + [source, csv] ---- :START_ID,:START_ID,:TYPE,:END_ID,:END_ID ---- -.relationships.csv [source, csv] ---- aa,11,WORKS_WITH,bb,22 ---- -==== +====== +===== [[multiple-IDs-Id-spaces]] -.Define multiple IDs stored in ID spaces -==== +=== Define multiple IDs stored in ID spaces -Define a `MyGroup` ID space in the _nodes_header.csv_ file. - -.nodes_header.csv +. Define a `MyGroup` ID space in the _nodes_header.csv_ file. ++ [source, csv] ---- personId:ID(MyGroup),memberId:ID(MyGroup),name ---- - -.nodes.csv ++ [source, csv] ---- aa,11,John bb,22,Paul ---- -Now use the defined ID space when connecting John with Paul, and use both IDs in the relationship. +. Now use the defined ID space when connecting John with Paul, and use both IDs in the relationship. ++ +[.tabbed-example] +===== +[role=include-with-multiple-node-IDs] +====== + +[source, csv] +---- +:START_ID(MyGroup),:TYPE,:END_ID(MyGroup) +---- + +[source, csv] +---- +aa11,WORKS_WITH,bb22 +---- + +====== +[role=include-with-multiple-IDs label--new-2025.07] +====== -.relationships_header.csv [source, csv] ---- :START_ID(MyGroup),:START_ID(MyGroup),:TYPE,:END_ID(MyGroup),:END_ID(MyGroup) ---- -.relationships.csv [source, csv] ---- aa,11,WORKS_WITH,bb,22 ---- -==== +===== +====== + [[import-tool-id-types-header]] == Storing a different value type for IDs in a group From 7e67dee96a4f41305dcff54914f52dec3112c436 Mon Sep 17 00:00:00 2001 From: Natalia Ivakina <82437520+NataliaIvakina@users.noreply.github.com> Date: Wed, 30 Jul 2025 15:33:50 +0200 Subject: [PATCH 2/8] Fix syntax mistake --- modules/ROOT/pages/import.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/import.adoc b/modules/ROOT/pages/import.adoc index 785792151..bee189973 100644 --- a/modules/ROOT/pages/import.adoc +++ b/modules/ROOT/pages/import.adoc @@ -1578,8 +1578,8 @@ aa11,WORKS_WITH,bb22 ---- aa,11,WORKS_WITH,bb,22 ---- -===== ====== +===== [[import-tool-id-types-header]] From 62e4c48d052d883172e966a17661aa5d9860dc4a Mon Sep 17 00:00:00 2001 From: Natalia Ivakina <82437520+NataliaIvakina@users.noreply.github.com> Date: Wed, 30 Jul 2025 15:44:24 +0200 Subject: [PATCH 3/8] Update import.adoc --- modules/ROOT/pages/import.adoc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/pages/import.adoc b/modules/ROOT/pages/import.adoc index bee189973..ae25e4ae0 100644 --- a/modules/ROOT/pages/import.adoc +++ b/modules/ROOT/pages/import.adoc @@ -1504,27 +1504,31 @@ bb,22,Paul Now use both IDs when defining the relationship: +.relationships_header.csv [source, csv] ---- :START_ID,:TYPE,:END_ID ---- +.relationships.csv [source, csv] ---- aa11,WORKS_WITH,bb22 ---- ====== -[role=include-with-multiple-IDs label--new-2025.07] +[role=include-with-multiple-node-IDs-2025.07] ====== -Starting from 2025.07, you can use multiple IDs when defining the relationship: +Starting from 2025.07, you have to use a matching number of `START_ID` / `END_ID` columns when defining the relationship: +.relationships_header.csv [source, csv] ---- :START_ID,:START_ID,:TYPE,:END_ID,:END_ID ---- +.relationships.csv [source, csv] ---- aa,11,WORKS_WITH,bb,22 @@ -1555,25 +1559,29 @@ bb,22,Paul [role=include-with-multiple-node-IDs] ====== +.relationships_header.csv [source, csv] ---- :START_ID(MyGroup),:TYPE,:END_ID(MyGroup) ---- +.relationships.csv [source, csv] ---- aa11,WORKS_WITH,bb22 ---- ====== -[role=include-with-multiple-IDs label--new-2025.07] +[role=include-with-multiple-node-IDs-2025.07] ====== +.relationships_header.csv [source, csv] ---- :START_ID(MyGroup),:START_ID(MyGroup),:TYPE,:END_ID(MyGroup),:END_ID(MyGroup) ---- +.relationships.csv [source, csv] ---- aa,11,WORKS_WITH,bb,22 From 37596e2d41b1a89823b9b51f4c7955aa4b0e7f02 Mon Sep 17 00:00:00 2001 From: Natalia Ivakina <82437520+NataliaIvakina@users.noreply.github.com> Date: Wed, 30 Jul 2025 15:47:57 +0200 Subject: [PATCH 4/8] Apply suggestions from code review --- modules/ROOT/pages/import.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/ROOT/pages/import.adoc b/modules/ROOT/pages/import.adoc index ae25e4ae0..4f0dbeaa8 100644 --- a/modules/ROOT/pages/import.adoc +++ b/modules/ROOT/pages/import.adoc @@ -1541,11 +1541,13 @@ aa,11,WORKS_WITH,bb,22 . Define a `MyGroup` ID space in the _nodes_header.csv_ file. + +.nodes_header.csv [source, csv] ---- personId:ID(MyGroup),memberId:ID(MyGroup),name ---- + +.nodes.csv [source, csv] ---- aa,11,John From b08d0f8aeba8f528b04f67ffa651768bd09883cf Mon Sep 17 00:00:00 2001 From: Natalia Ivakina <82437520+NataliaIvakina@users.noreply.github.com> Date: Wed, 30 Jul 2025 15:50:03 +0200 Subject: [PATCH 5/8] Update modules/ROOT/pages/import.adoc --- modules/ROOT/pages/import.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/import.adoc b/modules/ROOT/pages/import.adoc index 4f0dbeaa8..dd64fe702 100644 --- a/modules/ROOT/pages/import.adoc +++ b/modules/ROOT/pages/import.adoc @@ -1517,7 +1517,7 @@ aa11,WORKS_WITH,bb22 ---- ====== -[role=include-with-multiple-node-IDs-2025.07] +[role=include-with-multiple-ID-columns label--new-2025.07] ====== Starting from 2025.07, you have to use a matching number of `START_ID` / `END_ID` columns when defining the relationship: From f412d23b7bec5510c0f543323647306b60e28f1d Mon Sep 17 00:00:00 2001 From: Natalia Ivakina <82437520+NataliaIvakina@users.noreply.github.com> Date: Wed, 30 Jul 2025 15:54:22 +0200 Subject: [PATCH 6/8] Update modules/ROOT/pages/import.adoc --- modules/ROOT/pages/import.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/import.adoc b/modules/ROOT/pages/import.adoc index dd64fe702..6011dc1ee 100644 --- a/modules/ROOT/pages/import.adoc +++ b/modules/ROOT/pages/import.adoc @@ -1574,7 +1574,7 @@ aa11,WORKS_WITH,bb22 ---- ====== -[role=include-with-multiple-node-IDs-2025.07] +[role=include-with-multiple-ID-columns label--new-2025.07] ====== .relationships_header.csv From 0519f55fc4c7b390f2e363f154e0591ed595a7f3 Mon Sep 17 00:00:00 2001 From: Natalia Ivakina <82437520+NataliaIvakina@users.noreply.github.com> Date: Wed, 30 Jul 2025 16:06:41 +0200 Subject: [PATCH 7/8] Update import.adoc --- modules/ROOT/pages/import.adoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ROOT/pages/import.adoc b/modules/ROOT/pages/import.adoc index 6011dc1ee..f86e7098c 100644 --- a/modules/ROOT/pages/import.adoc +++ b/modules/ROOT/pages/import.adoc @@ -1480,16 +1480,14 @@ This functionality is only available with a full import. === Define multiple IDs as node properties -You can define multiple `ID` columns in the node header. - -For example, you can define a node header with two `ID` columns. - +. Define multiple `ID` columns in the node header. ++ .nodes_header.csv [source, csv] ---- :ID,:ID,name ---- - ++ .nodes.csv [source, csv] ---- @@ -1497,6 +1495,8 @@ aa,11,John bb,22,Paul ---- +. Define the relationship between two established nodes. ++ [.tabbed-example] ===== [role=include-with-multiple-node-IDs] From cfddffc7d46449c131f47793ac6ed9d89604e4b3 Mon Sep 17 00:00:00 2001 From: Natalia Ivakina <82437520+NataliaIvakina@users.noreply.github.com> Date: Thu, 14 Aug 2025 13:25:00 +0200 Subject: [PATCH 8/8] Update import.adoc --- modules/ROOT/pages/import.adoc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/ROOT/pages/import.adoc b/modules/ROOT/pages/import.adoc index f86e7098c..4af518da9 100644 --- a/modules/ROOT/pages/import.adoc +++ b/modules/ROOT/pages/import.adoc @@ -1499,7 +1499,7 @@ bb,22,Paul + [.tabbed-example] ===== -[role=include-with-multiple-node-IDs] +[role=include-with-single-ID-column] ====== Now use both IDs when defining the relationship: @@ -1558,7 +1558,7 @@ bb,22,Paul + [.tabbed-example] ===== -[role=include-with-multiple-node-IDs] +[role=include-with-single-ID-column] ====== .relationships_header.csv @@ -1577,6 +1577,8 @@ aa11,WORKS_WITH,bb22 [role=include-with-multiple-ID-columns label--new-2025.07] ====== +Starting from 2025.07, you have to use a matching number of `START_ID` / `END_ID` columns when defining the relationship: + .relationships_header.csv [source, csv] ----