# Invalid input 'x': expected 'n/N' (line 1, column 227 (offset: 226))

**URL:** <https://community.neo4j.com/t/invalid-input-x-expected-n-n-line-1-column-227-offset-226/36351>\
**Category:** Cypher\
**Created:** [April 5, 2021, 7:36am UTC](https://community.neo4j.com/t/invalid-input-x-expected-n-n-line-1-column-227-offset-226/36351 "2021-04-05T07:36:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sitashmarajbhandari7](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/sitashmarajbhandari7/32/16335_2.png) [@sitashmarajbhandari7](https://community.neo4j.com/u/sitashmarajbhandari7)\
**Post date:** [April 5, 2021, 7:36am UTC](https://community.neo4j.com/t/invalid-input-x-expected-n-n-line-1-column-227-offset-226/36351/1 "2021-04-05T07:36:40Z")

</div>

I am new to NEO4j and have been getting many errors and trouble while trying to learn cypher.  
How can I learn cypher properly?

I have been facing error while trying to load a csv file can anyone tell me what i have been doing wrong?

```auto
LOAD CSV WITH HEADERS FROM "file:///C:/Users/sitas/AppData/Local/Neo4j/Relate/Data/dbmss/dbms-a5c6a64c-958c-47c9-9068-d1e74d5258ca/import/Experiment_Design.csv" AS line with line merge(Aid:AIdNode{Name:line.analytical_sample external_id}) merge(Sid:SIdNode{Name:line.subject external_id}) merge(g2:G2Node{Name:line.grouping2}) merge(g1:G1Node{Name:line.grouping1}) merge(Bid:BIdNode{Name:line.biological_sample external_id});

```

Error:

```auto
Invalid input 'x': expected 'n/N' (line 1, column 227 (offset: 226))
"LOAD CSV WITH HEADERS FROM "file:///C:/Users/sitas/AppData/Local/Neo4j/Relate/Data/dbmss/dbms-a5c6a64c-958c-47c9-9068-d1e74d5258ca/import/Experiment_Design.csv" AS line with line merge(Aid:AIdNode{Name:line.analytical_sample external_id}) merge(Sid:SIdNode{Name:line.subject external_id}) merge(g2:G2Node{Name:line.grouping2}) merge(g1:G1Node{Name:line.grouping1}) merge(Bid:BIdNode{Name:line.biological_sample external_id}) ;"

```

---

<div class="post-metadata">

**Author:** ![akollegger1](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/akollegger1/32/14828_2.png) [@akollegger1](https://community.neo4j.com/u/akollegger1)\
**Post date:** [April 5, 2021, 7:55am UTC](https://community.neo4j.com/t/invalid-input-x-expected-n-n-line-1-column-227-offset-226/36351/2 "2021-04-05T07:55:40Z")

</div>

Hi @sitashmarajbhandari7 ,

A great way to learn Cypher is to take the free online [Graph Academy](https://neo4j.com/graphacademy) courses. They can take you all the way from the fundamentals to advanced modeling techniques. Well worth the time.

For your particular query, the error is pointing to the letter 'x' in this part of your query...

```auto
merge(Aid:AIdNode{Name:line.analytical_sample external_id})
                                               ^

```

The parser is confused by `external_id`. You may be missing a property name and full reference to the input. Guessing, it could be something like `EID` assigned to a value `line.external_id` from the CSV...

```auto
merge(Aid:AIdNode{Name:line.analytical_sample EID:line.external_id})

```

Spotting those errors can be tricky with a long line of text. If you're using Neo4j Browser, you can switch into multi-line mode by pressing `<shift-return>` where you'd like to have a line break. Once you're in multi-line mode, pressing `<return>`will just add newlines. To run the query you'd need to either type `<cmd-return>` or click on the "play" button.

Best,  
ABK

---

<div class="post-metadata">

**Author:** ![sitashmarajbhandari7](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/sitashmarajbhandari7/32/16335_2.png) [@sitashmarajbhandari7](https://community.neo4j.com/u/sitashmarajbhandari7)\
**Post date:** [April 5, 2021, 9:24am UTC](https://community.neo4j.com/t/invalid-input-x-expected-n-n-line-1-column-227-offset-226/36351/3 "2021-04-05T09:24:38Z")

</div>

Hello sir,

1. Thank you so much for the reference to the graph academy. I will be surely taking this course.

2. The csv file I am using had the property name with the space

I am guessing now that Neo4j browser is not able to parse property name with space therefore will edit the file.

Thank you for your quick response

with regards,  
Sitashma Rajbhandari

---

<div class="post-metadata">

**Author:** ![akollegger1](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/akollegger1/32/14828_2.png) [@akollegger1](https://community.neo4j.com/u/akollegger1)\
**Post date:** [April 6, 2021, 8:11am UTC](https://community.neo4j.com/t/invalid-input-x-expected-n-n-line-1-column-227-offset-226/36351/4 "2021-04-06T08:11:22Z")

</div>

Hi,

Ah, I see. Another approach which can be helpful is to enclose property names in backticks, like this...

```auto
merge(Aid:AIdNode{Name:line.`analytical_sample external_id`})

```

Best,  
ABK

---

<div class="post-metadata">

**Author:** ![sitashmarajbhandari7](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/sitashmarajbhandari7/32/16335_2.png) [@sitashmarajbhandari7](https://community.neo4j.com/u/sitashmarajbhandari7)\
**Post date:** [April 8, 2021, 11:13am UTC](https://community.neo4j.com/t/invalid-input-x-expected-n-n-line-1-column-227-offset-226/36351/5 "2021-04-08T11:13:39Z")

</div>

Hello Andreas Kollegger,

It worked! thank you so much!!

with regards  
Sitashma
