apoc.export.graphml.graph

Details

Syntax

apoc.export.graphml.graph(graph, file, config) :: (file, source, format, nodes, relationships, properties, time, rows, batchSize, batches, done, data)

Description

Exports the given graph to the provided GraphML file.

Input arguments

Name

Type

Description

graph

MAP

The graph to export.

file

STRING

The name of the file to which the data will be exported.

config

MAP

{ stream = false :: BOOLEAN, format = 'cypher-shell' :: STRING timeoutSeconds = 100 :: INTEGER, compression = 'NONE' :: ['NONE', 'BYTES', 'GZIP', 'BZIP2', 'DEFLATE', 'BLOCK_LZ4', 'FRAMED_SNAPPY'], charset = 'UTF_8' :: STRING, source :: MAP, target :: MAP, useTypes :: BOOLEAN caption :: LIST<STRING> }

Return arguments

Name

Type

Description

file

STRING

The name of the file to which the data was exported.

source

STRING

A summary of the exported data.

format

STRING

The format the file is exported in.

nodes

INTEGER

The number of exported nodes.

relationships

INTEGER

The number of exported relationships.

properties

INTEGER

The number of exported properties.

time

INTEGER

The duration of the export.

rows

INTEGER

The number of rows returned.

batchSize

INTEGER

The size of the batches the export was run in.

batches

INTEGER

The number of batches the export was run in.

done

BOOLEAN

Whether the export ran successfully.

data

ANY

The data returned by the export.

Configuration parameters

This procedure supports the following config parameters:

Configuration options
Parameter Type Default Description

stream

BOOLEAN

false

Return the data in the query result instead of storing it in a file.

compression

Enum[NONE, BYTES, GZIP, BZIP2, DEFLATE, BLOCK_LZ4, FRAMED_SNAPPY]

'NONE'

Allow taking binary data, either not compressed (value: NONE) or compressed (other values) .

timeoutSeconds

INTEGER

100

The maximum time in seconds the query should run before timing out.

charset

STRING

'UTF_8'

Name of the character extending java.nio.Charset in the currently used JDK. E.g.: US-ASCII, ISO-8859-1, UTF-8, UTF-16

useTypes

BOOLEAN

false

Add the types on to the file header.

format

STRING

'cypher-shell'

Export format.

source

MAP

false

To be used with target to import a relationships-only file. In this case, the source and target attributes of the edge tag are not based on the internal id of nodes but on a custom property value.
For example, in the path (:Foo {name: "aaa"})-[:KNOWS]→(:Bar {age: 666}), the KNOWS rel can be exported with a config <edge id="e2" source="aaa" sourceType="string" target="666" targetType="long" label="KNOWS"><data key="label">KNOWS</data><data key="id">1</data></edge>. Note the additional sourceType/targetType to detect the right type during the import.

target

MAP

100

To be used with source to import a relationships-only file. In this case, the source and target attributes of the edge tag are not based on the internal id of nodes but on a custom property value.
For example, in the path (:Foo {name: "aaa"})-[:KNOWS]→(:Bar {age: 666}), the KNOWS rel can be exported with a config <edge id="e2" source="aaa" sourceType="string" target="666" targetType="long" label="KNOWS"><data key="label">KNOWS</data><data key="id">1</data></edge>. Note the additional sourceType/targetType to detect the right type during the import.

caption

LIST<STRING>

['name', 'title', 'label', 'id']

Allow taking binary data, either not compressed (value: NONE) or compressed (other values) .