io

How to read or write a graph using low-level input/output.

Synopsis

io( [gryo() | graphson() | graphml()]).[readGraph | writeGraph] ( file_name )

Description

Graph data is written to a file or read from a file using io. The file to read must be located on a DSE cluster node, and the written file will be created on the DSE cluster node on which the command is run.

Examples

Write the graph data to a file using the Gryo format:
graph.io(gryo()).writeGraph('/tmp/test.gryo')
Read the graph data from a file using the Gryo format:
graph.io(gryo()).readGraph('/tmp/test.gryo')
Restriction: This method of reading a graph is not recommended, and will not work with graphs larger than 10,000 vertices or elements. DSE Graph Loader is a better choice in production. Additionally, a schema setting may need modification for this method to work:
schema.config().option("tx_autostart").set(true)