Skip to content

Commit 85dfe3a

Browse files
committed
editorial updates
1 parent 03013d7 commit 85dfe3a

File tree

3 files changed

+35
-16
lines changed

3 files changed

+35
-16
lines changed

modules/ROOT/pages/errors/gql-errors/22NAC.adoc

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,29 @@
44
error: data exception - characters after quote in CSV field. Characters after an ending quote in a CSV field are not supported. See `{ <<input>> }` at position `{ <<pos>> }`. This is read as `{ <<variable>> }`.
55

66
== Explanation
7-
When a CSV file has a field that starts with a quote has content after the ending quote that file is formatted incorrectly and trying to§ read such a file with `LOAD CSV` will result in an error.
7+
When a CSV file contains a field that starts with a quote and has content after the ending quote, the file is formatted incorrectly, and trying to read such a file with `LOAD CSV` will result in an error.
88

99
== Example scenario
1010

11-
Given that `somefile.csv` is a CSV file with the following content:
11+
For example, let's say you have a CSV file, called `somefile.csv`, with the following content:
12+
13+
[source,csv]
1214
----
1315
x,y
1416
"x",1
1517
"y"y,2
1618
----
17-
Then running the query;
19+
20+
Then, when you run the following query:
21+
22+
[source,cypher]
1823
----
19-
LOAD CSV 'somefile.csv' AS line RETURN count(line)
24+
LOAD CSV 'somefile.csv' AS line
25+
RETURN count(line)
2026
----
2127

22-
The following error will be thrown:
28+
you will receive an error with GQLSTATUS 22NAC and status description:
29+
2330
[source]
2431
----
2532
error: data exception - characters after quote in CSV field. Characters after an ending quote in a CSV field are not supported. See 'somefile.csv' at position 14. This is read as `y"y` .

modules/ROOT/pages/errors/gql-errors/22NAD.adoc

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,29 @@
44
error: data exception - missing end quote in CSV field. Missing end quote at position `{ <<pos>> }` in `{ <<input>> }`.
55

66
== Explanation
7-
When a CSV file has a field that starts with a quote but misses an ending quote that file is formatted incorrectly and trying to read such a file with `LOAD CSV` will result in an error.
7+
When a CSV file contains a field that starts with a quote but misses an ending quote, the file is formatted incorrectly and trying to read such a file with `LOAD CSV` will result in an error.
88

99
== Example scenario
1010

11-
Given that 'somefile.csv' is a CSV file with the following content:
11+
For example, let's say you have a CSV file, called `somefile.csv`, with the following content:
12+
13+
[source,csv]
1214
----
1315
x,y
1416
"x",1
1517
"y,2
1618
----
17-
Then running the query;
19+
20+
Then, when you run the following query:
21+
22+
[source,cypher]
1823
----
19-
LOAD CSV 'somefile.csv' AS line RETURN count(line)
24+
LOAD CSV 'somefile.csv' AS line
25+
RETURN count(line)
2026
----
2127

22-
The following error will be thrown:
28+
you will receive an error with GQLSTATUS 22NAD and status description:
29+
2330
[source]
2431
----
2532
error: data exception - missing end quote in CSV field. Missing end quote at position 15 in 'somefile.csv'.

modules/ROOT/pages/errors/gql-errors/22NAE.adoc

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,29 @@
44
error: data exception - multi-line field in illegal CSV context. Multi-line fields are illegal in this context. Verify that there is not a missing end quote in `{ <<input>> }` at position `{ <<pos>> }`.
55

66
== Explanation
7-
When a CSV file has a field that starts with a quote has content after the ending quote that file is formatted incorrectly and trying to read such a file with `LOAD CSV` will result in an error.
7+
When a CSV file contains a field that spans multiple lines, but the context in which it is being read does not allow multi-line fields, an error will be thrown. This often occurs when there is a missing end quote in a quoted field.
88

99
== Example scenario
1010

11-
Given that `somefile.csv` is a CSV file with the following content:
11+
For example, let's say you have a CSV file, called `somefile.csv`, with the following content:
12+
[source,csv]
1213
----
1314
x,y
1415
"x",1
1516
"y
1617
",2
1718
----
18-
And that the neo4j database logging is configured with specific allowed multiline files, but where `somefile.csv` is not among them.
19-
Then running the query;
19+
20+
And that the `neo4j` database logging is configured with specific allowed multiline files, but where `somefile.csv` is not among them.
21+
22+
Then, when you run the following query:
23+
[source,cypher]
2024
----
21-
LOAD CSV 'somefile.csv' AS line RETURN count(line)
25+
LOAD CSV 'somefile.csv' AS line
26+
RETURN count(line)
2227
----
2328

24-
The following error will be thrown:
29+
you will receive an error with GQLSTATUS 22NAE and status description:
2530
[source]
2631
----
2732
error: data exception - multi-line field in illegal CSV context. Multi-line fields are illegal in this context. Verify that there is not a missing end quote in 'somefile.csv' at position 15.

0 commit comments

Comments
 (0)