Skip to content

Instantly share code, notes, and snippets.

@lonniev
Created September 2, 2022 21:21
Show Gist options
  • Save lonniev/35b742a71662a7654c93c684b6db8291 to your computer and use it in GitHub Desktop.
Save lonniev/35b742a71662a7654c93c684b6db8291 to your computer and use it in GitHub Desktop.
Perform a Gremlin Query that counts within a Digital Thread the kinds of Types therein
g.E().has( 'Relation', 'container', 'Drone-006' ).bothV().dedup()
.where( and(
out( 'hasType' ),
out( 'ownedBy' ).or(
has( 'name', 'DronesFlow' ),
has( 'name', 'Drone_MDO_With_Mid_Fid_Aero' ),
has( 'name', 'Esteco_Drone03-StructureAndParametrics_a' ) ) ) )
.group().by( out( 'hasType' ).values( 'name' ) ).by( count() )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment