Having issues executing a cypher query generated from graphgen

时间:2018-03-25 20:01:26

标签: neo4j

I am using this tool : http://graphgen.graphaware.com/#/ to try to generate mock data for testing purposes. But the .cql file it generates shows errors in neo4j desktop. The first error shows this:

Neo.ClientError.Statement.SyntaxError: Expected exactly one statement per query but got: 91

I removed all the semicolons according to this answer: Trying to execute a list of Cypher statements in Neo4j via the admin interface

It then shows this error:

Invalid input 'C': expected whitespace, comment, ';' or end of input (line 2, column 1 (offset: 65)) "CREATE CONSTRAINT ON (media:Media) ASSERT media.neogen_id IS UNIQUE" ^

i try removing the constraints by deleting the first three lines but it shows another error: WITH is required between SET and MATCH (line 42, column 1 (offset: 1945)) "MATCH (s1:User {neogen_id: 'b085096ddc66811c2fc0ebe3e6b77ccb27a2e8cb'}), (e1:Media { neogen_id: '33420bcccdf7395f4d341b3480058c1aae01e3be'})"

Here's the file in a gist embed:

<script src="https://gist.github.com/scroobius-pip/466bc41f4c0597c9578821b2f73b7050.js"></script>

1 个答案:

答案 0 :(得分:2)

The shell tools should be able to run the script as is with the semicolons.

Try executing with cypher-shell, located in the bin folder of your installation.