Import using cypher- what's wrong here?

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

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 the above query, I get 195160, and not 195158. I did it twice, is this right?

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.

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

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.)

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 :smile:

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

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

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.

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_rosenber ,

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

Hey @elaine_rosenber

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