Creating a custom vertex id
How and when to create a custom vertex id.
A custom vertex id can be created to replace the standard vertex id generated when a
vertex is created. The use cases for creating a custom vertex id are:
- When the data stored in DSE Graph is aligned with other data sources, such as other Cassandra keyspaces or another database.
- When custom graph partitioning is desired.
Note: Standard auto-generated ids are
deprecated with DSE 6.0. Custom ids
will undergo changes, and specifying vertex ids with
For example, sensor time series data is stored
in Cassandra. In addition to the time series queries to Cassandra, relationship
information about the sensors is desired, such as how the sensors are networked and
where the sensors are located. To load the data into a graph to explore the
relationships, but retain the ability to write an application that accesses both the
time series data and the graph data, custom vertex ids are created that span across
both database models.partitionKey
and clusteringKey
will likely
become the normal method.CAUTION:
Keep in mind that if custom vertex ids are used, they must be
globally unique within the graph, or duplicate vertices can potentially be
loaded into a graph. DSE Graph does not verify the custom vertex ids.