Load movie csv file is failing

Hi,
I want to load a given csv file for movies CSV file to database.

my command is like this
:auto load csv with headers from 'https://neo4jmoviesdata.s3.us-east-1.amazonaws.com/movies.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAZ4XRUJBWIYFXPQD5%2F20230619%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230619T163210Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=422fea13129dd0599e8db69eab79edbe3bd8c66e84b5979d51c9d588d601778e' as row
CALL {
with row
MERGE (m:Movie {movieId: m.movieId})
SET m += row
} in transactions of 1000 rows

you may want to run it yourself.

it is giving error
Cannot merge the following node because of null property value for 'movieId': (:Movie {movieId: null}) (Failure when processing file '/movies.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAZ4XRUJBWIYFXPQD5%2F20230619%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230619T163210Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=422fea13129dd0599e8db69eab79edbe3bd8c66e84b5979d51c9d588d601778e' on line 2., Transactions committed: 0)

the file has movieId column and it is populated.

what is the reason?

as part of my troubleshooting, simply if i return row it works but the order of columns returned are not the same column orders in csv file.

in csv file,movieId is first column but it is not first column in row . what is the reason for that? can it cause the original problem ?

:auto load csv with headers from 'https://neo4jmoviesdata.s3.us-east-1.amazonaws.com/movies.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAZ4XRUJBWIYFXPQD5%2F20230619%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230619T163210Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=422fea13129dd0599e8db69eab79edbe3bd8c66e84b5979d51c9d588d601778e' as row
return row

When you return row, it is returning the row data in a map. The order is not necessarily pressured when displaying a map. The order is not an issue, as you access a map by is key values, not an indexed position.

I will try your code later to figure out what is wrong.

ARG...I can't believe this didn't pop out right away. Anyways you are setting the node's movieId to m.movieId. You need to set it to row.movieId.

:auto load csv with headers from 'https://neo4jmoviesdata.s3.us-east-1.amazonaws.com/movies.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAZ4XRUJBWIYFXPQD5%2F20230619%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230619T163210Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=422fea13129dd0599e8db69eab79edbe3bd8c66e84b5979d51c9d588d601778e' as row
CALL {
with row
MERGE (m:Movie {movieId: row.movieId})
SET m += row
} in transactions of 1000 rows

Great Gary, it worked

do you have access to a csv file that has Users node information for Movie or recommendation database i can created the nodes on my local db.

I need users nodes first before loading ratings.csv file.

thanks

The movie database is available to create in the browser. You can follow the instructions to create it. I believe you execute β€˜:play movies’. I can verify next time I am at my computer.