How to create a vertex label.


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.
Note: 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 will be 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.