Examining schema

How to examine schema.

Examining schema can be done to either verify the existence or non-existence of schema before creation.


  1. A list of all schema can be retrieved with the following command:

    In Studio and Gremlin console, a list is retrieved, although the presentation is different. Here is a portion of a Studio result:

  2. The schema for a particular element can be examined by appending describe() to a more specific schema:
    schema.edgeLabel("includedIn").connection("recipe", "meal").connection("recipe", "book").connection("recipe", "ingredient").connection("ingredient", "recipe").connection("meal", "book").add()
  3. Some groovy steps are useful in the Gremlin query to find specific schema descriptions. For instance, to inspect only the vertex labels and their indexes, use the split() and grep()steps:
    In Studio: