Run Cypher Script Files

Runs each statement in the file / each file, all semicolon separated

These procedures can be used to run files that are usually run by cypher-shell. e.g. files generated by Export to Cypher Script. They automatically skip :begin/:commit/:rollback operations as they are executed in a single transaction per file.

Procedure Overview

The available procedures and functions are described in the following table:

Qualified Name Type Release

apoc.cypher.runFile

apoc.cypher.runFile(file or url,[{statistics:true,timeout:10,parameters:{}}]) - runs each statement in the file, all semicolon separated

Procedure

APOC Full

apoc.cypher.runFiles

apoc.cypher.runFiles([files or urls],[{statistics:true,timeout:10,parameters:{}}])) - runs each statement in the files, all semicolon separated

Procedure

APOC Full

apoc.cypher.runSchemaFile

apoc.cypher.runSchemaFile(file or url,[{statistics:true,timeout:10}]) - allows only schema operations, runs each schema statement in the file, all semicolon separated

Procedure

APOC Full

apoc.cypher.runSchemaFiles

apoc.cypher.runSchemaFiles([files or urls],{statistics:true,timeout:10}) - allows only schema operations, runs each schema statement in the files, all semicolon separated

Procedure

APOC Full

Data Operations only

  • apoc.cypher.runFile(file or url,[{config}])

  • apoc.cypher.runFiles([files or urls],[{config})])

The apoc.cypher.run*File(s) procedures have some optional configuration:

  • {statistics:true/false} to output a row of update-stats per statement, default is true

  • {timeout:1 or 10} for how long the stream waits for new data, default is 10

Schema Operations only

  • apoc.cypher.runSchemaFile(file or url,[{config}])

  • apoc.cypher.runSchemaFiles([files or urls],[{config})])