cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Data Type detection within apoc.convert.fromJsonMap

I'm using the APOC function apoc.convert.fromJsonMap() from (apoc-3.5.0.4-all.jar) to consume JSON encoded data within a CSV column, like this:

LOAD CSV WITH HEADERS FROM 'http://myservice/?feed' AS line FIELDTERMINATOR ','
WITH line
WITH line, apoc.convert.fromJsonMap(line.json_field) AS js

I've recently hit upon an issue whereby a data set which I'm consuming contains long ints,

... snip ...
"Versions": 23,
 "Level": 10,
 "Grouping": 9762368238200516800,
 "TimeCreated": {
 "SystemTime": 1574461785.7325056
},
... snip ...

This results in the following error:

Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke function apoc.convert.fromJsonMap: Caused by: com.fasterxml.jackson.core.JsonParseException: Numeric value (9762368238200516800) out of range of long (-9223372036854775808 - 9223372036854775807)

Is it possible to force APOC to use a different data type to store this value?

2 REPLIES 2

fred
Node Link

Hi, some ideas: have you tried apo.load.fromjson ? can you parse the field into a string?

Where does that number come from?

Need to see if Jackson supports turning those into bigdecimal or strings or sth.