Import using cypher- what's wrong here?

julia_choi
Node

Hi, I wonder why The result is wrong.
I did redo all challenges for this mission(Import using cypher) But The error message repeatedly. T^T

23 REPLIES 23

The verification of this Challenge has a problem that we are in the process of fixing. If your import is correct, this code should return true which we will correct in the course:

call apoc.meta.stats() yield labelCount, relTypeCount, propertyKeyCount, nodeCount, relCount
with labelCount, relTypeCount, propertyKeyCount, nodeCount, relCount
return labelCount + relTypeCount + propertyKeyCount + nodeCount + relCount = 195158 as outcome

Elaine

When I run your code, it returns False. Which one is right? 195160 or 195158? Please help me, I cannot complete the course. Thank you.

venkat1
Node Link

when I run the above query, I get 195160, and not 195158. I did it twice, is this right?

Hello @venkat1 and @yoga.yustiawan and Welcome to the Neo4j Community!

Did you delete all nodes and relationships at the beginning of the Challenge?

Do you have exactly 4 constraints defined?

Elaine

Hi Elaine,

I had same trouble as others. Resolved by using a new Blank Sandbox, adding these four constraints:

CREATE CONSTRAINT User_userId ON (x:User) ASSERT x.userId IS UNIQUE;
CREATE CONSTRAINT Person_tmdbId ON (x:Person) ASSERT x.tmdbId IS UNIQUE;
CREATE CONSTRAINT Movie_movieId ON (x:Movie) ASSERT x.movieId IS UNIQUE;
CREATE CONSTRAINT Genre_name ON (x:Genre) ASSERT x.name IS UNIQUE ;

And then pushed through "Run in Sandbox" (and with a second test, own copy-pasted Cypher).

PASSED

After adding the first batch (Movie) nodes, outcome cypher script should produce 29508.

Regards,
Cliff

PS. Thank you so much for GraphAcademy. Looking very much to getting Certified.

Congratulations!

We are updating the course to show the constraints you should have in the graph before the import.

Thank you all for your feedback so we can improve the course.

Elaine

Hello,

It seems there is still a problem in the course exercise.

Does the "'https://data.neo4j.com/importing/2-movieData.csv'" file have been updated to include more properties ?

Because the first step that asks to create the Movie and Genre nodes has not the expected result as you can see on the screenshot below. Consequently, it is not possible to end the challenge and the course with a successfull check.

venkat1
Node Link

Thanks for the follow-up, Elaine.

This is what I get, for a total of 195160.
{'labelCount': 6, 'relTypeCount': 4, 'propertyKeyCount': 26, 'nodeCount': 28863, 'relCount': 166261}

I did it twice, for the same result. (BTW, I cheated, dropped a couple of relations to pass the test, in case you notice, I have successfully completed it.)

venkat1
Node Link

Thanks, Cliff. Did you have to drop the prev constraints? or just creating them was sufficient?

Hello @aymeric.lebrun,

Thank you for pointing out this error in the content. Your number is correct. We will update the course.

Elaine

Hello @elaine.rosenberg ,

There is the same problem with the query that insert the person nodes but for the others it is ok.

Hey @elaine.rosenberg

I'm having the same issue with Movie property count. It's as @aymeric.lebrun mentioned

Is there a temporary workaround that would allow us to pass until it's permanently fixed? I tried dropping some properties and it didn't work

Thank you

Hello,
The training documentation has not yet been updated but I tried it again yesterday and it seems the check at the end is ok now because I was able to end the training successfully.

If you follow all of the steps of the challenge, you should get these results when you execute this code:

CALL apoc.meta.stats() Yield labelCount, relTypeCount, propertyKeyCount, nodeCount, relCount
WITH labelCount, relTypeCount, propertyKeyCount, nodeCount, relCount
RETURN labelCount, relTypeCount ,propertyKeyCount ,nodeCount ,relCount, labelCount + relTypeCount + propertyKeyCount + nodeCount + relCount AS total

Result:

labelCount,relTypeCount,propertyKeyCount,nodeCount,relCount,total
6,4,24,28863,166261,195158

Elaine

Thanks for your reply

I believe I did follow all the steps. I also made sure to delete everything before retrying. Here are my results:

labelCount, relTypeCount, propertyKeyCount, nodeCount, relCount, total
6, 4, 26, 28863, 166261, 195160

Not sure where it's getting the extra. I think @venkat1 had the exact same numbers

For some reason, you have 2 extra property keys in your graph.

If you execute:

CALL db.propertyKeys() YIELD propertyKey
WITH collect(propertyKey) as Keys
RETURN apoc.coll.sort(Keys) AS Sorted Keys

It should return:
["born", "bornIn", "budget", "countries", "died", "imdbId", "imdbRating", "imdbVotes", "languages", "movieId", "name", "plot", "poster", "rating", "released", "revenue", "role", "runtime", "timestamp", "title", "tmdbId", "url", "userId", "year"]

Elaine

Thanks, Elaine

The 2 extra property keys on my end are "bio" and "genres". Genres should have been split and then removed (the code provided doesn't remove it). I tried setting them to null and it still returns them when I get the property keys using the code you provided

We've discovered the problem. We use a propertyKey count to total objects in the graph to verify this Challenge in the course. Unfortunately, we discovered that even though the propertyKey no longer exists for any nodes, it still remains in the graph.

We will be correcting this validation of this Challenge in the course that caused problems for some folks who did not start with a fresh sandbox.

We do apologize for this inconvenience.

Elaine

Yes, I can confirm that

Thanks, Elaine. Much appreciated

Hi @elaine.rosenberg!

I need some help. I ran the 7 steps, but the validation won't work.

When I show the constraints, I can see that there are 5 instead of 4. There is a "Movies" label, which seems redundant. Is it possible that that is the problem? How can I get rid of that extra constraint?

Thanks in advance!

DROP CONSTRAINT constraint_5cc7b9fa

will delete the constraint.

Elaine

Still having the same troubles as those above--even after running the solution code, I am told that I've failed.

I also tried the beta, and was blocked from proceeding by a database-related window.

I have now spent 3 days on this single problem. I'd love a little help.

suvi
Node Link

@vang37 

just delete the existing database. Create a new blank database on sandbox then start with setting the constraints and other loading the csv steps.
Worked for me. 👍👍👍