Not able to match string id in cypher

58 Views Asked by At

I loaded my dataset by csv file name moviestoactors.csv with this particular command

LOAD CSV FROM 'file:///desktop-csv-import/moviestoactors.csv' AS row
WITH row[0] AS movieId, row[1] AS actorId, row[2] AS as_character, row[3] AS leading
MERGE (m:moviestoactors {movieId:movieId })
SET m.actorId = actorId, m.as_character = as_character, m.leading = leading
RETURN count(m)

The first problem i faced was that i was not able to load actorId as toInteger(row[1]) as actorId since it was showing syntax error like it is out of bound since the value of integer is too much large for integer to handle, and i did not find any solution for that so i decided to load actor id as string. Now if i want to match some id with anysort of id, i am not able to i dont know what is it but it is not working properly even though i checked my csv file and it had that id 9 times, for instance this is actorId 244663, this is my query which is not working, what should work then?

MATCH(ma:moviestoactors)
WITH ma.movieId AS movieId WHERE ma.actorId = '244663'
return movieId

To summarize the whole thing, first problem is how to get my id to be in integer form and the second thing if it is not in integer why it is not even matching in string form.

0

There are 0 best solutions below