LINK_PATH
Description
Warning
To use this feature, Object Link needs to be configured with Object Link in the data model.
The LINK_PATH
operator creates an internal activity and case table to represent individual paths calculated by traversing the Object Link graph. The resulting activity table is joined towards the input table and to the internal case table in a N:1 fashion. Additional tables containing link attributes are generated and can be accessed via the LINK_PATH_SOURCE/TARGET
operators.
Warning
In some settings, this operator may require excessive CPU time. If the execution time exceeds 10 minutes, the execution is stopped and an error is reported.
The output of LINK_PATH
is a column containing all objects of all calculated paths, where each row's data corresponds to the value of the object in the input column. If only individual objects are of interest and a complete path is not required, use LINK_SOURCE/LINK_TARGET
instead. As the generated tables are joined to the input table, all objects, as specified in the Object Link mapping table, must reside within this one table in order to avoid join cycles in the data model.
Syntax
LINK_PATH ( input_table.column [, direction ] [, CONSTRAINED BY ( [ START ( start_objects_expression ) ] [, END ( end_objects_expression ) ] [, LENGTH ( comparison length ) ] ) ] )
LINK_PATH
acquires object attributes from the specifiedinput_table.column
. Therefore, all objects, as they are specified in the Object Link mapping table, must be contained in this table.direction
specifies the traversal direction. Valid values for the parameter areFORWARDS
(default) andBACKWARDS
.The graph traversal can further be
CONSTRAINED BY
:start_objects_expression
is a condition to specify the start objects of the graph traversal.end_objects_expression
is a condition to specify the end objects of the graph traversal.comparison
is one of=
(equal),!=
(not equal),<>
(not equal),<
(less than),<=
(less than or equal),>
(greater than) or>=
(greater than or equal). In conjunction withlength
, which is a positive integer, this can be used to specify the desired path lengths (as measured by the number of objects).
Syntax
Warning
Deprecated. Please use the previous syntax instead.
PATH( input_table.column [, FILTER start_objects_expression ] [, FILTER end_objects_expression ] [, direction ])
The
input_table
must contain all objects specified in the Object Link mapping table.The
start_objects_expression
andend_objects_expression
parameters are commonFILTER
conditions.Valid values for the
direction
parameter areFORWARDS
(default) andBACKWARDS
.
NULL handling
Object Link mapping table entries with NULL values in the OUT column are ignored.
Object Link mapping table entries with NULL values in the IN column will register the object specified in the OUT column. However, no link will be added to the Object Link graph.
Examples
[1]
![]()
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[2] Since | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[3] We can limit the traversal on more interesting objects by specifying conditions for the START and END objects respectively. Arbitrarily complex conditions can be used to select these objects. Note that for each unique combination of constraints, a new activity and case table is generated. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[4] Implicit start and end objects without INCOMING and OUTGOING links can also be specified explicitly via the LINK_OBJECTS operator. In the following example, A is disqualified as a START object since it is an isolated object without any outgoing links. | |||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||
|
[5] The result of | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[6]
![]()
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[7] To limit the length of the paths, we can use the | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|