Home / Companies / Neo4j / Blog / Post Details
Content Deep Dive

Run Cypher to Analyze Neo4j Graph Database Inconsistencies

Blog post from Neo4j

Post Details
Company
Date Published
Author
Eric Monk
Word Count
2,136
Language
English
Hacker News Points
-
Summary

To check for data inconsistencies in a Neo4j graph database, you can use Cypher to examine your nodes by node label and print out node labels having different property key sets. The process involves creating an initial Cypher query that works for a single Node Label, then using the returned Node Labels to create individual Cypher statements for each Node Label. These statements are then run using APOC's `apoc.cypher.run()` function, which returns results in a map format. The final step is to process these results to determine which Node Labels may have different property keys, and to check if there is more than one row from each Cypher query, indicating inconsistent data. By running this query, you can identify potential issues with your data model and take corrective action.