How will i add unique values to the vertices or edge properties in Neptune
I can't get a doc regarding adding unique data through gremlin. Is there any way to do it, other than the preset unqiue which is available only in field id
Solution:Jump to solution
if by "unique data" i can't help wondering you're looking for some mechanism to define constraints on a property key. if so, there is no such feature for Neptune. You would have to contrive some system for ensuring uniqueness on your own. There are graphs that have full schema support like JanusGraph that can use an index to support uniqueness: https://docs.janusgraph.org/schema/index-management/index-performance/#index-uniqueness
2 Replies
MergeV
step can be used https://docs.aws.amazon.com/neptune/latest/userguide/gremlin-efficient-upserts.html#gremlin-upserts-verticesMaking efficient upserts with Gremlin mergeV() and mergeE() steps -...
How to optimize upserts in Gremlin using mergeV() and mergeE().
Solution
if by "unique data" i can't help wondering you're looking for some mechanism to define constraints on a property key. if so, there is no such feature for Neptune. You would have to contrive some system for ensuring uniqueness on your own. There are graphs that have full schema support like JanusGraph that can use an index to support uniqueness: https://docs.janusgraph.org/schema/index-management/index-performance/#index-uniqueness