I am in the section using the Neo4j Data Importer (https://graphacademy.neo4j.com/courses/importing-data/2-using-data-importer/2-c-importing-CSV/)andand) looks like the check database function is not working correctly. Even on an empty database its throws JSON.parse: unexpected character at line 1 column 1 of the JSON data. I have done the steps correctly multiple times and it does not validate. I have terminated the sandbox and started from an fresh one as well.
Does this code return True? If not then there is a problem with what you mapped for the import:
CALL apoc.meta.nodeTypeProperties( ) YIELD nodeType, propertyName, propertyTypes
WITH collect([ nodeType+'.'+propertyName, propertyTypes ]) AS nodeProperties
WITH
all (condition IN [
// Renamed Properties
[ pair IN nodeProperties WHERE pair[0] = ':`Movie`.tmdbId' | pair[1] = ['Long'] ],
[ pair IN nodeProperties WHERE pair[0] = ':`Movie`.imdbId' | pair[1] = ['Long'] ],
[ pair IN nodeProperties WHERE pair[0] = ':`Movie`.poster' | pair[1] = ['String'] ],
[ pair IN nodeProperties WHERE pair[0] = ':`Movie`.url' | pair[1] = ['String'] ],
[ pair IN nodeProperties WHERE pair[0] = ':`Person`.tmdbId' | pair[1] = ['Long'] ],
[ pair IN nodeProperties WHERE pair[0] = ':`Person`.imdbId' | pair[1] = ['Long'] ],
[ pair IN nodeProperties WHERE pair[0] = ':`Person`.poster' | pair[1] = ['String'] ],
[ pair IN nodeProperties WHERE pair[0] = ':`Person`.url' | pair[1] = ['String'] ],
// Converted Data Types
[ pair IN nodeProperties WHERE pair[0] = ':`Movie`.revenue' | pair[1] = ['Long'] ],
[ pair IN nodeProperties WHERE pair[0] = ':`Movie`.budget' | pair[1] = ['Long' ]]
] WHERE condition[0] = true) AS nodes
WITH nodes
CALL apoc.meta.relTypeProperties( ) yield relType, propertyName, propertyTypes
WHERE relType = ":`RATED`"
AND propertyName = "rating"
AND "Long" in propertyTypes
WITH nodes, count(*) as c
RETURN nodes AND count(*) = 1 as outcome
My db didn't have any nodes, but I had to delete blank sandbox db and recreate another one. Then, after all steps I have succeed to go through validation in academy.
Hello, I'm afraid this issue happened again. I have dropped the sandbox and recreate again then importing the csv, but the result is still error "Unexpected token"