Graph walk query function overview
Use the graph walk function to retrieve CI and relationship instances when you do not know the exact relationship path to follow, for example, to view all the dependencies of a computer system regardless of the class to which the dependencies belong. You must know the instance from which to begin the graph walk.
The starting node and query loop
To successfully retrieve instances using the graph walk functions, first specify the start node (CMDBGraphWalkBegin
) for the graph walk. Then use the hasNextChunk
member of the CMDBGraphWalkStateStruct
structure to loop until you retrieve all the rows that match the query.
In the loop, you call the CMDBGraphWalkNext
function until the query has no more records to return. Chunking occurs when the maxRetrieve
parameter has a value greater than 0. Otherwise, the query returns all the nodes in the first call. For example, if the query retrieves 500 rows of data and the maxRetrieve
parameter is set to 100, the CMDBGraphWalkNext
function returns 100 nodes in the first call, 100 nodes in the next, and so on.
Comments