Skip to content

Commit 8c8060c

Browse files
committed
Vectors in importer.
1 parent dacf6f4 commit 8c8060c

File tree

1 file changed

+63
-27
lines changed

1 file changed

+63
-27
lines changed

modules/ROOT/pages/import.adoc

Lines changed: 63 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,24 @@ The syntax for importing a set of CSV files is:
8383

8484
[source, syntax, role="nocopy"]
8585
----
86-
neo4j-admin database import full [-h] [--expand-commands] [--verbose] [--auto-skip-subsequent-headers[=true|false]]
87-
[--ignore-empty-strings[=true|false]] [--ignore-extra-columns[=true|false]]
88-
[--legacy-style-quoting[=true|false]] [--normalize-types[=true|false]]
89-
[--overwrite-destination[=true|false]] [--skip-bad-entries-logging[=true|false]]
90-
[--skip-bad-relationships[=true|false]] [--skip-duplicate-nodes[=true|false]] [--strict
91-
[=true|false]] [--trim-strings[=true|false]] [--additional-config=<file>]
92-
[--array-delimiter=<char>] [--bad-tolerance=<num>] [--delimiter=<char>]
93-
[--format=<format>] [--high-parallel-io=on|off|auto] [--id-type=string|integer|actual]
86+
neo4j-admin database import full [-h] [--expand-commands] [--verbose] [--auto-skip-subsequent-headers
87+
[=true|false]] [--ignore-empty-strings[=true|false]]
88+
[--ignore-extra-columns[=true|false]] [--legacy-style-quoting
89+
[=true|false]] [--normalize-types[=true|false]] [--overwrite-destination
90+
[=true|false]] [--skip-bad-entries-logging[=true|false]]
91+
[--skip-bad-relationships[=true|false]] [--skip-duplicate-nodes
92+
[=true|false]] [--strict[=true|false]] [--trim-strings[=true|false]]
93+
[--additional-config=<file>] [--array-delimiter=<char>]
94+
[--bad-tolerance=<num>] [--delimiter=<char>] [--format=<format>]
95+
[--high-parallel-io=on|off|auto] [--id-type=string|integer|actual]
9496
[--input-encoding=<character-set>] [--input-type=csv|parquet]
95-
[--max-off-heap-memory=<size>] [--quote=<char>] [--read-buffer-size=<size>]
96-
[--report-file=<path>] [--schema=<path>] [--temp-path=<path>] [--threads=<num>]
97-
--nodes=[<label>[:<label>]...=]<files>... [--nodes=[<label>[:<label>]...=]<files>...]...
98-
[--relationships=[<type>=]<files>...]... [--multiline-fields=true|false|<path>[,
99-
<path>] [--multiline-fields-format=v1|v2]] <database>
97+
[--max-off-heap-memory=<size>] [--quote=<char>]
98+
[--read-buffer-size=<size>] [--report-file=<path>] [--schema=<path>]
99+
[--temp-path=<path>] [--threads=<num>] [--vector-delimiter=<char>] --nodes=
100+
[<label>[:<label>]...=]<files>... [--nodes=[<label>[:<label>]...=]
101+
<files>...]... [--relationships=[<type>=]<files>...]...
102+
[--multiline-fields=true|false|<path>[,<path>]
103+
[--multiline-fields-format=v1|v2]] <database>
100104
----
101105

102106
=== Description
@@ -166,6 +170,12 @@ Unicode character ID can be used if prepended by `\`.
166170
| {check-mark}
167171
| {check-mark}
168172

173+
|--vector-delimiter=<char>
174+
|Delimiter character between vector coordinates within a value in CSV data. Accepts the same values as `--array-delimiter`.
175+
|;
176+
| {check-mark}
177+
| {check-mark}
178+
169179
| --auto-skip-subsequent-headers[=true\|false]
170180
|Automatically skip accidental header lines in subsequent files in file groups with more than one file.
171181
|false
@@ -639,21 +649,26 @@ The syntax for importing a set of CSV files incrementally is:
639649

640650
[source, syntax, role="nocopy"]
641651
----
642-
neo4j-admin database import incremental [-h] [--expand-commands] --force [--update-all-matching-relationships]
643-
[--verbose] [--auto-skip-subsequent-headers[=true|false]]
644-
[--ignore-empty-strings[=true|false]] [--ignore-extra-columns[=true|false]]
645-
[--legacy-style-quoting[=true|false]] [--normalize-types[=true|false]]
646-
[--skip-bad-entries-logging[=true|false]] [--skip-bad-relationships
647-
[=true|false]] [--skip-duplicate-nodes[=true|false]] [--strict[=true|false]]
652+
neo4j-admin database import incremental [-h] [--expand-commands] --force
653+
[--update-all-matching-relationships] [--verbose]
654+
[--auto-skip-subsequent-headers[=true|false]]
655+
[--ignore-empty-strings[=true|false]] [--ignore-extra-columns
656+
[=true|false]] [--legacy-style-quoting[=true|false]]
657+
[--normalize-types[=true|false]] [--skip-bad-entries-logging
658+
[=true|false]] [--skip-bad-relationships[=true|false]]
659+
[--skip-duplicate-nodes[=true|false]] [--strict[=true|false]]
648660
[--trim-strings[=true|false]] [--additional-config=<file>]
649-
[--array-delimiter=<char>] [--bad-tolerance=<num>] [--delimiter=<char>]
650-
[--high-parallel-io=on|off|auto] [--id-type=string|integer|actual]
661+
[--array-delimiter=<char>] [--bad-tolerance=<num>]
662+
[--delimiter=<char>] [--high-parallel-io=on|off|auto]
663+
[--id-type=string|integer|actual]
651664
[--input-encoding=<character-set>] [--input-type=csv|parquet]
652-
[--max-off-heap-memory=<size>] [--quote=<char>] [--read-buffer-size=<size>]
653-
[--report-file=<path>] [--schema=<path>] [--stage=all|prepare|build|merge]
654-
[--temp-path=<path>] [--threads=<num>] --nodes=[<label>[:<label>]...=]<files>...
655-
[--nodes=[<label>[: <label>]...=]<files>...]... [--relationships=[<type>=]<files>...]...
656-
[--multiline-fields=true|false|<path>[,<path>]
665+
[--max-off-heap-memory=<size>] [--quote=<char>]
666+
[--read-buffer-size=<size>] [--report-file=<path>]
667+
[--schema=<path>] [--stage=all|prepare|build|merge]
668+
[--temp-path=<path>] [--threads=<num>] [--vector-delimiter=<char>]
669+
--nodes=[<label>[:<label>]...=]<files>... [--nodes=[<label>[:
670+
<label>]...=]<files>...]... [--relationships=[<type>=]
671+
<files>...]... [--multiline-fields=true|false|<path>[,<path>]
657672
[--multiline-fields-format=v1|v2]] <database>
658673
----
659674

@@ -1274,7 +1289,7 @@ For properties, the `<name>` part of the field designates the property key, whil
12741289
You can have properties in both node data files and relationship data files.
12751290
The max length of property keys for block format is 16,383 characters.
12761291

1277-
Use one of `int`, `long`, `float`, `double`, `boolean`, `byte`, `short`, `char`, `string`, `point`, `date`, `localtime`, `time`, `localdatetime`, `datetime`, and `duration` to designate the data type for properties.
1292+
Use one of `int`, `long`, `float`, `double`, `boolean`, `byte`, `short`, `char`, `string`, `point`, `date`, `localtime`, `time`, `localdatetime`, `datetime`, `duration`, and `vector` to designate the data type for properties.
12781293
By default, types (except arrays) are converted to Cypher types.
12791294
See link:{neo4j-docs-base-uri}/cypher-manual/current/values-and-types/property-structural-constructed/#_property_types[Cypher Manual -> Property, structural, and constructed values].
12801295

@@ -1391,6 +1406,27 @@ This overrides the header definition for `date1`, as well as the configured defa
13911406
13921407
====
13931408

1409+
Special considerations for vector data types::
1410+
+
1411+
--
1412+
A vector is specified using the Cypher syntax for maps.
1413+
The map must specify both the `coordinateType` and the `dimensions` of the vector.
1414+
The `coordinateType` can be one of `byte`, `short`, `int`, `long`, `float`, or `double`.
1415+
The `dimensions` must be between 1 and 4096, inclusive.
1416+
1417+
By default, vector values are separated by `;`.
1418+
A different delimiter can be specified with `--vector-delimiter`.
1419+
1420+
The dimensions of each vector in the data must match what is specified in the header.
1421+
1422+
A vector in a header could for example look like this:
1423+
[source, csv]
1424+
----
1425+
:ID,"vector1:vector{coordinateType:byte,dimensions:4096}"
1426+
----
1427+
1428+
Note that quotation marks are necessary, since the `,` inside the map would otherwise be interpreted as a column delimiter.
1429+
--
13941430

13951431
[[import-tool-id-spaces]]
13961432
== Using ID spaces

0 commit comments

Comments
 (0)