apoc.export.arrow.all
Procedure
apoc.export.arrow.all(file STRING, config MAP<STRING, ANY>)
- exports the full database as an arrow file.
It is considered unsafe to run this procedure using 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.all(file :: 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 |
Config parameters
The procedure support the following config parameters:
name | type | default | description |
---|---|---|---|
batchSize |
Integer |
2000 |
the batch size of the ArrowStreamWriter |
Usage Examples
The procedure expose an Arrow file with the following structure
- <id>
: for node id
- <labels>
: list of labels
- <source.id>
: source node id (in case of relationship)
- <target.id>
: target node id (in case of relationship)
- <type>
: for relationship type
- the list of properties of nodes and relationships flattened as table
So for the following query:
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 {age:12}),(d:Another {foo: 'bar'})
With this query:
CALL apoc.export.arrow.all('my_file.arrow') YIELD file, source, format,
nodes, relationships, properties,
time, batchSize,
batches, done, data
We’ll have an arrow file with the following columns:
-
<id>
-
<labels>
-
<source.id>
-
<target.id>
-
<type>
-
name
-
age
-
male
-
kids
-
born
-
place
-
since
-
bffSince