Inserting data using GraphSON

GraphSON is JSON data that defines a vertex with its ID and label, outgoing and incoming edges, and properties.

  1. Identify the vertex ID and label.


    Each vertex must have an identifier. Generally, a label is defined to denote the type of vertex. In this example, the vertex shown is an author vertex.

  2. Identify the vertex properties.

            "value":"Simone Beck"}]

    Each property is identified with a name, ID, and value. The example shows the author name name, which has a value of Simone Beck, and gender valued as F.

  3. Add outgoing edges.

        "inV":{"~label":"book","member_id":52,"community_id":1733329920}}, {

    Each edge must have a label and ID. The example shows an authored edge. For an outgoing edge as shown in the example, an incoming vertex, inV, must be identified by vertex identification.

  4. Close and name the GraphSON file, using a suffix of ".json".

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000,