Constraints in AWS Neptune

0

I have exported data from neo4j then converted that exported csv into nodes.csv and edges.csv using neo4j-neptune.jar file to load data in Neptune .In neo4j I have created constraints so will that exported csv have constraints also or do we need to define again in Neptune .If we need to define it again then how we can do that .I am using SageMaker notebook for querying data. I am trying below query for creating constraints but getting token recognition error %%gremlin graph.schema().propertyKey('id').Text().create() graph.schema().index().forNodes('Person').withName('uniqueIdConstraint').by('id').unique().add()

asked 7 months ago281 views
1 Answer
0
Accepted Answer

Neptune has two built-in constraints:

  • Each node and edge ID must be unique (so it is highly advised that if you want to maintain uniqueness via a certain value, then use that value in the built-in ~id for a node or edge).
  • Each edge must have a node at either end of the edge (no dangling edges).

Beyond that, Neptune is schema-on-read. https://docs.aws.amazon.com/neptune/latest/userguide/migration-compatibility.html

profile pictureAWS
answered 7 months ago
  • Thank you @Taylor-AWS

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions