apoc.export.arrow.graph
|
此过程不被认为是多线程安全运行的。因此,并行运行时(在 Neo4j 5.13 中引入)不支持它。有关更多信息,请参阅Cypher 手册 → 并行运行时。 |
语法 |
|
||
描述 |
将给定图导出为 Arrow 文件。 |
||
输入参数 |
名称 |
类型 |
描述 |
|
|
要导出数据到的文件名称。 |
|
|
|
要导出的图。 |
|
|
|
|
|
返回参数 |
名称 |
类型 |
描述 |
|
|
数据导出到的文件名称。 |
|
|
|
导出数据的摘要。 |
|
|
|
文件导出的格式。 |
|
|
|
导出的节点数量。 |
|
|
|
导出的关系数量。 |
|
|
|
导出的属性数量。 |
|
|
|
导出持续时间。 |
|
|
|
返回的行数。 |
|
|
|
导出运行的批处理大小。 |
|
|
|
导出运行的批处理数量。 |
|
|
|
导出是否成功运行。 |
|
|
|
导出返回的数据。 |
|
使用示例
此过程会暴露一个 Arrow 文件,其中包含以下结构的行:- <id>: 节点 ID - <labels>: 标签列表 - <source.id>: 源节点 ID(关系的情况下)- <target.id>: 目标节点 ID(关系的情况下)- <type>: 关系类型 - 节点和关系的属性列表被展平为表格
所以对于以下查询
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'})
通过此查询
CALL apoc.graph.fromDB('neo4j',{}) yield graph
CALL apoc.export.arrow.graph('my_file.arrow', graph) YIELD file, source, format,
nodes, relationships, properties,
time, rows, batchSize,
batches, done, data
我们将得到一个包含以下列的 Arrow 文件
-
<id> -
<labels> -
<source.id> -
<target.id> -
<type> -
name -
age -
male -
kids -
born -
place -
since -
bffSince