Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-23-2019 08:49 PM
Error
Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure apoc.load.json
: Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'topic_key': was expecting 'null', 'true', 'false' or NaN at [Source: (apoc.export.util.CountingInputStream); line: 1, column: 11]
Statement
<call apoc.load.json('file:///cred_event_TurkRatings.data') yield value
return value
limit 5>
Problem:
What can I do now to fix this problem?
I have enabled the settings in the configuration.
apoc.import.file.enabled=true
apoc.import.file.use_neo4j_config=true
dbms.security.allow_csv_import_from_file_urls=true
03-24-2019 06:08 AM
You can provide the full path or use the config option:
If you put it into the import directory then enable this in your config.
apoc.import.file.use_neo4j_config=true
Enable reading properties: dbms.directories.import
, dbms.security.allow_csv_import_from_file_urls
03-24-2019 08:41 AM
hi, michael,
thank you very much for your reply.
I have enabled these command in the configuration. I have even tried to use the full path. But it still failed.
Moreover, I tried to load csv data by using apoc.load.csv, it cannot work either, which can be loaded successfully by < load csv from...> provided by cypher.
04-01-2019 12:53 AM
Hi @keelong the apoc.load.csv
has the following signature:
CALL apoc.load.csv('url',{config}) YIELD lineNo, list, strings, map, stringMap
so you can invoke it in the following way:
CALL apoc.load.csv('file:///desktop-csv-import/orders.csv') YIELD lineNo, list, strings, map, stringMap
you can also yield
a specific value, i.e.:
CALL apoc.load.csv('file:///desktop-csv-import/orders.csv') YIELD map
which returns a map of values
About the apoc.load.json
, the input seems not to be a valid json; just to be sure can you try to validate it with this online service?
03-24-2019 08:41 AM
03-31-2019 03:35 PM
Which OS are you running?
And where exactly did you put your file.
09-04-2020 08:45 AM
How and where can I enable the config and the reading properties?
All the sessions of the conference are now available online