This page walks through exporting a graph to a GraphML file using gqldb-exporter. Unlike the CSV / JSON exports, GraphML produces a single file that contains both nodes and edges.
Bash./gqldb-exporter -sample graphml
A file named export.sample.graphml.yml will be created in the current directory. Rename it before editing so a re-run of -sample graphml doesn't clobber your changes:
Bashmv export.sample.graphml.yml export.graphml.yml
Edit export.graphml.yml to point at your source graph and choose an output directory. See the Export Configurations for every field.
config snippetsettings: format: graphml output_path: "./exported" batch_size: 5000 export_nodes: true export_edges: true include_metadata: true log_level: info
The nodes_file / edges_file fields don't apply — GraphML always produces a single combined file.
Bash./gqldb-exporter -c export.graphml.yml
The exporter writes a single graph.graphml file in output_path:
Directory layoutexported/ └── graph.graphml
The output is standard GraphML:
<data> attribute on <node> elements, with a configurable key name.<data> attribute on <edge> elements.<data> element, declared via <key> headers at the top of the file.The exported file round-trips through the GraphML import — set the importer's schemaAttr to the same key name to recover the original labels.