tf_graph_shortest_path
Given a distance-weighted directed graph, consisting of a queryCURSOR
input consisting of the starting and ending node for each edge and a distance, and a specified origin and destination node, tf_graph_shortest_path
computes the shortest distance-weighted path through the graph between origin_node
and destination_node
, returning a row for each node along the computed shortest path, with the traversal-ordered index of that node and the cumulative distance from the origin_node
to that node. If either origin_node
or destination_node
do not exist, an error is returned.
Input Arguments
Parameter | Description | Data Types |
---|---|---|
| Origin node column in directed edge list CURSOR | Column< INT | BIGINT | TEXT ENCODED DICT> |
| Destination node column in directed edge list CURSOR | Column< INT | BIGINT | TEXT ENCODED DICT> (must be the same type as |
| Distance between origin and destination node in directed edge list CURSOR | Column< INT | BIGINT | FLOAT | DOUBLE > |
| The origin node to start graph traversal from. If not a value present in | BIGINT | TEXT ENCODED DICT |
| The destination node to finish graph traversal at. If not a value present in | BIGINT | TEXT ENCODED DICT |
Output Columns
Name | Description | Data Types |
---|---|---|
| The index of this node along the path traversal from | Column< INT > |
| The current node along the path traversal from | Column < INT | BIGINT | TEXT ENCODED DICT> (same type as the |
| The cumulative distance adding all input | Column < INT | BIGINT | FLOAT | DOUBLE> (same type as the |
Example A
Example B
Last updated