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

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

Procedure

Apoc Extended

apoc.cypher.runFilesReadOnly

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

Procedure

Apoc Extended

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 Extended

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 Extended

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 Extended

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 Extended

Read Operations only

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

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

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})])