You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/data_io/import_data.md
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -240,7 +240,25 @@ The following options control how CSV files are parsed during `COPY FROM`. These
240
240
|`quoting`| bool |`true`| Whether to enable quote processing |
241
241
|`escaping`| bool |`true`| Whether to enable escape character processing |
242
242
243
-
> **Array limitation:**`COPY FROM` CSV currently does not auto-detect or directly materialize fixed-size `ARRAY` columns from bracketed CSV fields such as `"[1,2,3]"`. Use Cypher literals/parameters for array properties, or a typed non-CSV ingestion path when available.
243
+
`COPY FROM` supports loading `ARRAY` data from CSV,
244
+
JSON, and Parquet files. NeuG does not implicitly convert input values to
245
+
`ARRAY`; use `LOAD FROM` and explicitly cast the column to a fixed-size
246
+
`ARRAY` type.
247
+
248
+
For example, given a `person_array.csv` file with an array column:
249
+
250
+
```csv
251
+
id,name,address
252
+
1,Alice,"[Beijing,Hangzhou,Shanghai]"
253
+
2,Bob,"[London,Paris,Berlin]"
254
+
```
255
+
256
+
```cypher
257
+
COPY Person FROM (
258
+
LOAD FROM "person_array.csv" (delim=',')
259
+
RETURN id, name, CAST(address, 'STRING[3]') AS addresses
Copy file name to clipboardExpand all lines: doc/source/data_io/load_data.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,23 @@ LOAD FROM "person.csv" (delim=',', header=true)
46
46
RETURN name, age;
47
47
```
48
48
49
-
> **Array limitation:**`LOAD FROM` CSV currently does not parse CSV fields into fixed-size `ARRAY` values. A quoted field such as `"[1,2,3]"` is read as a `STRING`, and casting CSV columns to `INT64[3]`/other fixed-size array targets inside `LOAD FROM` is not supported yet.
49
+
NeuG supports reading `ARRAY` data from CSV, JSON,
50
+
and Parquet files. NeuG does not implicitly convert input values to `ARRAY`;
51
+
explicitly cast the column to a fixed-size `ARRAY` type in the `RETURN`
52
+
clause.
53
+
54
+
For example, given a `person_array.csv` file with an array column:
55
+
56
+
```csv
57
+
id,name,address
58
+
1,Alice,"[Beijing,Hangzhou,Shanghai]"
59
+
2,Bob,"[London,Paris,Berlin]"
60
+
```
61
+
62
+
```cypher
63
+
LOAD FROM "person_array.csv" (delim=',')
64
+
RETURN id, name, CAST(address, 'STRING[3]') AS addresses;
0 commit comments