Path Finding functions
The ability to find routes through the graph between interesting assets can be accomplished through Path Finding functions.
SOMEHOW ALPHA
This feature is currently in ALPHA and breaking changes are planned. We are making it available now to all customers as it does solve some interesting problems, but do not rely on it for critical workflows at this time.
The SOMEHOW
function is used to find paths through the graph between interesting assets, where you may not know the intermediate nodes or relationships.
The "entry" and "exit" points of a SOMEHOW query must be small sets of assets, ideally a single asset. Broad targets will likely return no results.
Query Syntax:
FIND <source entity>
THAT SOMEHOW <depth> <relationship classes> <target entity>
RETURN TREE
source entity
is the starting point of the path, and should ideally be a single assetrelationship classes
is a collection of relationship classes to traverse, such asRELATES TO
,(HAS|IS)
, orALLOWS
depth
is the maximum number of intermediate nodes to traverse, defaulting to 5 with a maximum of 10target entity
is the ending point of the path, and should ideally be a single asset
Example: Finding paths between Google Cloud Organizations and Google Cloud Projects via intermediate Google Cloud Folders
FIND google_cloud_organization
THAT SOMEHOW HAS google_cloud_project
RETURN TREE
This produces all the intermediate nodes between the Google Cloud Organization and Google Cloud Project, that use the HAS
relationship class. It includes more than just the intermediate Google Cloud Folders, which is a limitation of the current implementation and will be addressed as part of the Alpha program.
Example: Finding how Person entities may relate to the github_account
FIND Person
THAT SOMEHOW RELATES TO github_account
RETURN TREE
This gives a good summary of the potential relationships. It's likely that this query hit the internal limit of 250 intermediate nodes, but it still provides a good summary of the potential relationships. Again, this is a known limitation of the current implementation and will be addressed as part of the Alpha program.
There are some important limitations to be aware of at this time:
- The
SOMEHOW
function has an internal limit of 250 intermediate nodes in a path. This is to prevent runaway queries. Currently the system cannot tell you if you have hit this limit. Getting no results does NOT mean there are no paths between the two assets.