addV

Specify a vertex from a traversal.

Synopsis

g.addV('vertexLabel')
   .[ property ('property\_key') ... ]

Description

The addV() step is a map of sideEffect. A vertex is added from a traversal g using addV. A previously created vertex label must be specified. Property key-value pairs may be optionally specified.

Examples

Create a vertex with a vertex label person with the properties person_id, name, gender, nickname, and country.

g.addV('person').
   property('person_id', 'e7cd5752-bc0d-4157-a80f-7523add8dbcd' as UUID).
   property('name', 'Julia CHILD').
   property('gender','F').
   property('nickname', ['Jay', 'Julia'] as Set).
   property('country', [['USA', '1912-08-12' as LocalDate, '1944-01-01' as LocalDate] as Tuple, ['Ceylon', '1944-01-01' as LocalDate, '1945-06-01' as LocalDate] as Tuple, ['France', '1948-01-01' as LocalDate, '1960-01-01' as LocalDate] as Tuple, ['USA', '1960-01-01' as LocalDate, '2004-08-13' as LocalDate] as Tuple])

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, info@datastax.com