Query/Access Root Level Properties and Nested Properties of Vertex in Single Query – Gremlin Query – Titan

Query/Access Root Level Properties and Nested Properties of Vertex in Single Query - Gremlin Query - Titan

Query/Access Root Level Properties and Nested Properties of Vertex in Single Query – Gremlin Query – Titan

Gremlin Query:

g.V().hasLabel('TEST_LABEL').has('_id','xxxxxxxxxxxxxx').as('v')
.select('v').valueMap(true).as('properties')
.select('v').properties('nestedPropertiesKey').valueMap().as('nestedProperties')
.select('properties','nestedProperties')

Sample Response:

{
     "properties":{
          "attr1":"value1"
     },
     "nestedProperties":{
          "nestedAttr1":"nestedValue1"
     }

}

Related Links:

  1. Gremlin Query Language - Create Vertex/Node and Edge/Relationship
  2. Check If Vertex/Edge Exist - Gremlin Query - Titan
  3. Update Properties of Multiple Edges - Gremlin Query - Titan
  4. Update Properties of Multiple Vertices - Gremlin Query - Titan
  5. Create Vertex If Does Not Exist - Gremlin Query - Titan
  6. Query/Access Root Level Properties and Nested Properties of Vertex in Single Query - Gremlin Query - Titan
  7. Update Vertex If Exist - Gremlin Query - Titan
  8. Update Multiple Properties of Vertex - Gremlin Query - Titan
Read More...

[ YOU MAY ALSO LIKE ]

Leave a Reply