I am currently stuck in this exercise: Transform Strings to Lists | GraphAcademy (neo4j.com)
I tried everything. Even I copied the exact same thing that was in the solution. Still it shows error. Can anyone help?
The same for me. I even restarted the whole course from scratch using the provided solutions.
I have the same problem. I have included screenshots. The first shows the property lists and the second shows the error when I try to rerun the command.
Any help please ?
(migrated from khoros post Re: Multi-value string to list problem - Neo4j - 60009)
Hi John,
When you run the query the first time, it will convert the string (which contains one or more items) to a list (I doubt it's actually an array). So when you run it a second time, it's not a string anymore. That's why you cannot run it twice without starting from scratch.
Second screenshot.
hey Leo,
Thanks for the reply. I posted the error to show that it already ran and that there was no longer a string to convert. I'm stuck at the same place you are. I completed all the steps but the validation fails.
- Do you know if there is a way to have someone validate our DB and tell us definitively if its a user or system error?
i'm in the same boat. hopefully we hear something soon
Hi John,
I'm afraid we are stuck. I have sent an email. Wait and see but I have limited time in my side. Hope you'll find a solution too.
Hello all,
We made some internal changes to the Importing CSV data course that messed up the verification process.
We are working on the solution and will let you know when it has been fixed.
Elaine
Did anyone get any help or hear back. Stuck in the same boat and have started from scratch multiple times but get stuck in the same place.
The course is now fixed and imports and verifications should be all set. The only remaining code that is incorrect that we will fix tomorrow is the code in the last Challenge of the course. The loading of user rating data should be:
:auto USING PERIODIC COMMIT
LOAD CSV WITH HEADERS
FROM 'https://data.neo4j.com/importing/2-ratingData.csv'
AS row
MATCH (m:Movie {movieId: toInteger(row.movieId)})
MERGE (u:User {userId: toInteger(row.userId)})
ON CREATE SET u.name = row.name
MERGE (u)-[r:RATED]->(m)
ON CREATE SET r.rating = toInteger(row.rating),
r.timestamp = toInteger(row.timestamp)
Thank you Elaine and thanks to the Neo4j team for helping!
Hi Elaine,
I am still getting this problem, even while using the provided solution.
Is there a work around?
Hello @brandon1 ,
Typically, the verification fails because the graph has been modified in such a way that the Cypher we use to check fails. Is it possible that you performed other operations on the graph in addition to those required of the challenge?
All that I can suggest is to clear the graph with:
CREATE OR REPLACE DATABASE neo4j
And then try the last challenge from the beginning.
Elaine
This worked for me
MATCH (m:Movie)
set m.movieId=toInteger(m.movieId)
RETURN m.movieId, m.title
ORDER BY m.movieId
and then then it worked. Somehow the movieId was set to a string data type
Hi Elaine
The code of the check database button is still an issue. I just tried. Though the three fields have been converted successfully to lists after running the code below, the check database button verification somehow says otherwise...
///////////////////////////////////////////////////////////////////
MATCH (m:Movie)
SET m.countries = split(coalesce(m.countries,""), "|"),
m.languages = split(coalesce(m.languages,""), "|"),
m.genres = split(coalesce(m.genres,""), "|")
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
For the transforming lists Challenge, You may have executed the solution code, but if the starting graph is not 100%, the check may fail. I suggest that you redo the import after you have cleared the graph with:
CREATE OR REPLACE DATABASE neo4j
Then perform the challenges up to and including the one you are stuck on.
Here is the code we use to check whether your transformation worked. It should return true:
MATCH (m:Movie {movieId: 10}) RETURN size(m.languages) + size(m.countries) + size(m.genres) = 8 AS outcome.
I dropped all nodes, re-ran the code to convert born and died to date fields, then the code to convert languages, countries, and genres to lists and the check still fails. Something is wrong with the validation code
Thank you Elaine very much.
I did this
MATCH (m:Movie)
set m.movieId=toInteger(m.movieId)
RETURN m.movieId, m.title
ORDER BY m.movieId
and then then it worked. Somehow the movieId was set to a string data type
Thanks a lot