Closed stuartlaurie closed 6 years ago
Sorry that was an oversight :( during a refactoring.
Will be fixed in release this week, already in code.
Try this meanwhile: https://www.dropbox.com/s/v1chsae8jkfb8he/apoc-3.3.0.1.jar?dl=0
Hi, I'm facing a similar issue.
NEO4J: 2019-12-09 22:54:09.510+0000 INFO ======== Neo4j 3.5.12 ========
APOC: apoc-3.5.0.6-all.jar
Error:
Failed to invoke procedure
apoc.cypher.runFile: Caused by: org.neo4j.cypher.internal.v3_5.util.SyntaxException: Invalid input ':': expected <init> (line 2, column 1 (offset: 1))
Start of the file:
:begin
CREATE CONSTRAINT ON (node:WorkingDay) ASSERT (node.productHash, node.sku, node.supplierId, node.facilityId, node.dayOfWeek) IS NODE KEY;
CREATE CONSTRAINT ON (node:ProductVariation) ASSERT (node.productHash, node.sku, node.supplierId) IS NODE KEY;
CREATE CONSTRAINT ON (node:ProductionDay) ASSERT (node.supplierId, node.facilityId, node.productHash, node.sku, node.days) IS NODE KEY;
Export:
call apoc.export.cypher.query("<QUERY OMITTED>","export_cypher_format_updateAll.cypher", {format:'cypher-shell',cypherFormat:'updateAll'})
Still not compatible?
Are you using the cypher-shell for importing the file? In case so please try:
$ cat <your_folder>/export_cypher_format_updateAll.cypher | <NEO4J_HOME>/bin/cypher-shell -u username -p password
For a deep dive, please look at this article: https://medium.com/neo4j/efficient-neo4j-data-import-using-cypher-scripts-7d1268b0747
Feel free to ask if you need more infos
@gabrielpires please look at the comment above :)
@conker84 thanks for the return. I figure out that testing after I post my comment.
Thanks for the reference.
While trying to take a subset of a graph (so i could test re-factoring on a smaller set) I was trying a few ways to export/import.
when trying to export using (Neo4j 3.3.2 Enterprise - APOC 3.3.0.1)
call apoc.export.cypher.query("match (n)-[r]-(n2) return * limit 100","/tmp/mysubset_cyphershell.cypher",{format:'cypher-shell'})
and then
cat /tmp/mysubset_cyphershell.cypher | ./bin/cypher-shell
I get the following error:
When doing the export using the {format:plain} the pipe to cypher-shell works
I was expecting the format:cypher-shell to work with cypher-shell