0

Hi can i know the schema validation mechanisms available for LPG inside AWS Neptune.

For RDF we have a couple of them but i am not finding help on LPG.

Thanks in Advance.

I have tried mechanism for RDF such as SHACL but for LPG i am clueless on how to validate my schema before ingestion to the database.

Kelvin Lawrence
  • 14,674
  • 2
  • 16
  • 38
Nikhil
  • 1
  • 1
  • Schema definition and enforcement is definitely an interesting topic. It would be helpful to perhaps expand the question with details of the specific types of schema support you are looking for. I added a brief answer below. – Kelvin Lawrence Apr 10 '23 at 13:44
  • Basically i need to define constraints to the edges, the from side and to side connections, define constraints on the properties, define specific properties for Vertices, edges.. – Nikhil Apr 10 '23 at 14:57

1 Answers1

0

Currently, Amazon Neptune does not support any sort of schema definition or enforcement language for property graph data. The only constraints that are enforced are those around IDs. A user can specify their own node and edge IDs and those IDs must be unique. If you try to create a node or edge with an existing ID, Neptune will return an error.

For now, Neptune offers a fairly open field approach to property graph development. You can just start adding nodes, edges and properties into an empty graph. Neptune will automatically maintain at least 3 indices over the data that you enter.

A few additional schema-like notes:

Neptune will perform existence checks when creating edges, either using queries, or the Bulk Loader. Both vertices must already exist for an edge creation to succeed. For nodes if the label is omitted, Neptune will create a default label of "vertex". When adding an edge, the label must be provided. Neptune allows multiple node labels on the same node to be specified.

Kelvin Lawrence
  • 14,674
  • 2
  • 16
  • 38
  • But can there be JSON validation that can be done before ingesting data into the AWS Neptune. – Nikhil Apr 10 '23 at 14:40
  • Currently that would have to be done as application logic. What sort of validation do you have in mind? – Kelvin Lawrence Apr 10 '23 at 14:56
  • Basically i need to define constraints to the edges, the from side and to side connections, define constraints on the properties, define specific properties for Vertices, edges. – Nikhil Apr 10 '23 at 15:29
  • Makes perfect sense. Today that would have to be done by the application prior to loading any data into Neptune. – Kelvin Lawrence Apr 10 '23 at 16:39
  • Yes, but here i dont have any application i am planning to use this as a data store for analytical operations. – Nikhil Apr 10 '23 at 17:23
  • By "application", I'm thinking it could be as simple as a part of the data ETL and/or preparation process. It would check the data against a schema before loading it into the graph. It does not have to be an actual end-user facing application. – Kelvin Lawrence Apr 11 '23 at 17:43