Sai Naveen
Sai Naveen

Reputation: 1

I am trying to import json file into neo4j,

I am getting this message

Neo.ClientError.Statement.SyntaxError: Invalid input '@': expected whitespace, a property key name, '}', an identifier or UnsignedDecimalInteger (line 1, column 152 (offset: 151))

This is the code i used in cypher query

CALL apoc.load.json("file:///C:/Users/C63086/Downloads/neo4j-community-3.4.0/naveen.export.json") YIELD value AS E2812HA0011EP MERGE (u:E2812HA0011EP {rid: E2812HA0011EP.@rid}) SET u.actualR = E2812HA0011EP.actualR, u.sumPartno = E2812HA0011EP.sumPartno, u.comments = E2812HA0011EP.comments, u.Partno = E2812HA0011EP.Partno, u.title = E2812HA0011EP.title, u.priority = E2812HA0011EP.priority, u.expectedR = E2812HA0011EP.expectedR, u.configid = E2812HA0011EP.configid, u.subtitle = E2812HA0011EP.subtitle, u.Qty = E2812HA0011EP.Qty, u.model = E2812HA0011EP.model, u.family = E2812HA0011EP.family, u.sku = E2812HA0011EP.sku, u.bundle = E2812HA0011EP.bundle

So, is there anything wrong with it?

Upvotes: 0

Views: 629

Answers (1)

logisima
logisima

Reputation: 7478

You are trying to read a property called @rid, but the @ is a special charater. So you need to escape the name of this property by putting back quote like this :

 ... E2812HA0011EP.`@rid` ...

Upvotes: 1

Related Questions