LINK_FILTER
Description
Warning
To use this feature, Object Link needs to be configured in the data model.
LINK_FILTER enables object-based recursive filtering on the Object Link graph.
The Object Link configuration connects rows belonging to specified tables, resulting in a virtual graph structure. Each row is represented by an object in the graph. The graph structure is represented by an edge table of directed links between rows from the tables. These links can be defined via dedicated mapping tables, in which each row correspond to one link.
The LINK_FILTER operator can be used to filter along the links of the Object Link graph. The user can specify a condition defining the starting point and the direction in which the graph should be traversed to apply the filter.
LINK_FILTER returns Boolean values and can therefore be used in all places where a condition is expected. Usually it is used as the condition of a FILTER or CASE WHEN statement.
LINK_FILTER starts a traversal of the graph with the objects of the graph that fulfill the given condition. All objects that are passed with the traversal are included in the filter result. The traversal is done in the direction that was specified. Given a filter statement, LINK_FILTER first maps the filter to objects and then extends the resulting filter to cover all preceding or succeeding objects (according to the Object Link configuration)
Syntax
LINK_FILTER ( filter_expression, {ANCESTORS|DESCENDANTS} [, number_of_hops] )LINK_FILTER ( BIND_FILTERS ( object_link_table, filter_expression ), {ANCESTORS|DESCENDANTS} [, number_of_hops] )filter_expressionneeds to be a column from the Object Link table.If a
filter_expressionneither belongs to an Object Link table nor is based onLINK_SOURCE/LINK_TARGET, it can first be pulled to an Object Link table using the BIND_FILTERS operator.ANCESTORSfilters on the object and all ancestors of that object in the Object Link graph, whileDESCENDANTSfilters on the object and all descendants of that object.number_of_hops(optional) is an INT parameter that specifies how many levels to include in the link traversal process. Everything above this level will be not be included in the result.LINK_FILTERcan be used together with FILTER and CASE WHEN statements.
NULL handling
NULL values in the OUT and IN columns from the Object Link configuration are ignored.
Examples
[1] A | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[2] A | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[3]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[4] A | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[5] A | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[6] If a given attribute is not provided in the object table itself, we can utilize | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Signal Link (Deprecated)
Warning
The legacy Signal Link configuration is deprecated and no longer actively supported.
[7] Example of
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[8] Example of
![]() | |||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
|
[9] Example of
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
LINK_FILTER_ORDERED
LINK_FILTER_ORDERED ( filter_expression, {ANCESTORS|DESCENDANTS} [, number_of_hops] )LINK_FILTER_ORDERED ( BIND_FILTERS ( activity_table, filter_expression ), {ANCESTORS|DESCENDANTS} [, number_of_hops] )The
ORDEREDversion ofLINK_FILTERconsiders the order of the activity table based on the timestamps. For example, in contrast to the regular LINK_FILTER, only outgoing links of an activity that takes place after the activity with the incoming link are considered.LINK_FILTER_ORDEREDcan only be used with a Signal Link setup.
[10] Example of
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
[11] Example of
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
