schema.vertexLabel('vertexLabel').[ partitionKey(propertyKey, [ partitionKey(propertyKey) ] ].[ clusteringKey(propertyKey) ].[ ttl ].[ properties(property, property) ].[ index ].[ partition() ].[ cache() ].[ ifNotExists() ].[ create() | add() | describe() | exists() ]


A vertex label specifies a type of vertex that can be stored in DSE Graph. A vertex label can have properties defined, a partition key, clustering key, indexes, cache, and a time-to-live (TTL) to determine the lifecycle of an vertex.

DSE Graph limits the number of vertex labels to 200 per graph.


Create a vertexLabel author.


Create a vertexLabel ingredient if the vertex label doesn’t already exist.


For partition and clustering keys, see partitionKey-clusteringKey.

Add properties to a vertexLabel.


For indexes, see each index entry (edge index, property index, vertex index) in the Schema API.

Cache all properties for author vertices up to an hour (3600 seconds).


Enabling property cache causes index queries to use IndexCache for the specified vertex label.

Cache both incoming and outgoing created edges for author vertices up to a minute (60 seconds).


Partition a vertexLabel based on a particular edgeLabel.


Create a time-to-live (TTL) for an vertexLabel of 60 seconds. Setting a TTL will expire all vertices inserted with the vertexLabel at the set TTL value.


DSE Graph sets TTL differently from the DSE database. The DSE database sets TTL per mutation (insertion or update) or can inherit a default value from the table schema. DSE Graph sets TTL per vertex label or edge label, and all vertices or edges are affected by the TTL setting. DSE Graph cannot set TTL for an individual vertex or edge.

Check if a vertexLabel exists.


Get the schema creation command for a vertexLabel using the describe() command.


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,