apoc.export.arrow.query
Procedure
apoc.export.arrow.query(file STRING, query STRING, config MAP<STRING, ANY>)
- exports the results from the given Cypher query as an arrow file.
This procedure is not considered safe to run from multiple threads. It is therefore not supported by the parallel runtime (introduced in Neo4j 5.13). For more information, see the Cypher Manual → Parallel runtime. |
Signature
apoc.export.arrow.query(file :: STRING, query :: STRING, config = {} :: MAP) :: (file :: STRING, source :: STRING, format :: STRING, nodes :: INTEGER, relationships :: INTEGER, properties :: INTEGER, time :: INTEGER, rows :: INTEGER, batchSize :: INTEGER, batches :: INTEGER, done :: BOOLEAN, data :: ANY)
Output parameters
Name | Type |
---|---|
file |
STRING |
source |
STRING |
format |
STRING |
nodes |
INTEGER |
relationships |
INTEGER |
properties |
INTEGER |
time |
INTEGER |
rows |
INTEGER |
batchSize |
INTEGER |
batches |
INTEGER |
done |
BOOLEAN |
data |
STRING |
Usage Examples
Let’s suppose we have this data set:
CREATE (f:User {name:'Adam',age:42,male:true,kids:['Sam','Anna','Grace'], born:localdatetime('2015185T19:32:24'), place:point({latitude: 13.1, longitude: 33.46789})})-[:KNOWS {since: 1993, bffSince: duration('P5M1.5D')}]->(b:User {name:'Jim',age:42}),(c:User {name: 'John', age:12}),(d:Another {foo: 'bar'})
With this query:
CALL apoc.export.arrow.query('my_file.arrow', 'MATCH (n:User) RETURN count(n) as count, n.name as name') YIELD file, source, format,
nodes, relationships, properties,
time, rows, batchSize,
batches, done, data
We’ll have an arrow file with the following columns:
-
count
-
name