Skip to main content

Celonis Product Documentation

LINK_SOURCE - LINK_TARGET - LINK_ATTRIBUTES
Description

Warning

To use this feature, Object Link needs to be configured in the data model.

LINK_SOURCE/LINK_TARGET outputs the source or target objects of links that are generated according to the Object Link configuration of the data model. LINK_ATTRIBUTES returns link values.

Object Link creates a graph structure connecting arbitrary rows of different tables. We distinguish between two types of Object Link: Signal Link and Object Link.

The Signal Link configuration connects activities (more precisely, rows in the corresponding activity tables) from different cases and activity tables using signal columns, resulting in a virtual edge table of directed links between rows from the activity tables.

The Object Link configuration connects objects or uniquely identifiable rows by using the mentioned graph structure.

LINK_SOURCE outputs values from the outgoing or source side of a link, LINK_TARGET outputs values from the incoming or target side of a link, LINK_ATTRIBUTES outputs values of the link. LINK_SOURCE, LINK_TARGET and LINK_ATTRIBUTES support multiple column expressions, so the links between multiple tables can be combined in one output table.

LINK_ATTRIBUTES returns values defined in the mapping table, links defined via signals will contain NULL values.

Syntax
 LINK_SOURCE( object_link_table1.column [, object_link_table2.column] ...)
 LINK_TARGET( object_link_table1.column [, object_link_table2.column] ...)
 LINK_ATTRIBUTES( mapping_table1.column [, mapping_table2.column] ...)
  • The specified columns need to belong to different Object Link tables or mapping tables.

 LINK_SOURCE( BIND ( object_link_table1, table1.column ) [, BIND ( object_link_table2, table2.column ) ] ...)
 LINK_TARGET( BIND ( object_link_table1, table1.column ) [, BIND ( object_link_table2, table2.column ) ] ...)
  • If a column (e.g. table1.column) does not belong to an Object Link table, it can first be pulled to this table using the BIND operator.

NULL handling
  • NULL values in the OUT and IN columns from the Object Link configuration are ignored.

  • If in a row the value of a specified column is NULL, but the row still has a matching IN or OUT row, the result for this entry will be NULL as well.

Examples

[1]

Simple example on a single activity table. The OUT column of the activity table is specified as the outgoing link and the IN column is specified as the incoming link.

As the OUT value of activity B of case 1 is equal to the IN value of activity C of case 2, the link B ➔ C is returned.

Query

Column1

         LINK_SOURCE ( "Activities"."ACTIVITY" )
        

Column2

         LINK_TARGET ( "Activities"."ACTIVITY" )
        

Input

Output

Activities

CASE_ID : string

ACTIVITY : string

TIMESTAMP : date

OUT : string

IN : string

'1'

'A'

Thu Dec 01 2016 13:00:00.000

null

null

'1'

'B'

Thu Dec 01 2016 13:01:00.000

'a'

null

'2'

'C'

Thu Dec 01 2016 13:02:00.000

null

'a'

'2'

'D'

Thu Dec 01 2016 13:03:00.000

null

null

Result

Column1 : string

Column2 : string

'B'

'C'

[2]

Simple example on the case table. The OUT column of the activity table is specified as the outgoing link and the IN column is specified as the incoming link.

The value column of the case table is pulled to the activity table using BIND. Based on the outgoing and incoming links in the activity table, the link B ➔ C is present, which links case 1 ➔ case 2. Therefore, the corresponding case values 5 ➔ 7 are returned as the result.

Query

Column1

         LINK_SOURCE ( BIND ( "Activities" , "Cases"."Value" ) )
        

Column2

         LINK_TARGET ( BIND ( "Activities" , "Cases"."Value" ) )
        

Input

Output

Activities

CASE_ID : string

ACTIVITY : string

TIMESTAMP : date

OUT : string

IN : string

'1'

'A'

Thu Dec 01 2016 13:00:00.000

null

null

'1'

'B'

Thu Dec 01 2016 13:01:00.000

'a'

null

'2'

'C'

Thu Dec 01 2016 13:02:00.000

null

'a'

'2'

'D'

Thu Dec 01 2016 13:03:00.000

null

null

Cases

CASE_ID : string

Value : int

'1'

5

'2'

7

Foreign Keys

Cases.CASE_ID

Activities.CASE_ID

Result

Column1 : int

Column2 : int

5

7

[3]

This example shows how cases can be connected via Object Link. This scenario has two configurations:

  • 1. The outgoing column "OUT" of "Case_Table_A" connects to the incoming column "IN" of "Case_Table_B".

  • 2. The outgoing column "OUT" of "Case_Table_B" connects to the incoming column "IN" of "Case_Table_A".

Since we are querying all links whose source object is in either "Case_Table_A" or "Case_Table_B" and whose destination object is in either "Case_Table_A" or "Case_Table_B", all links will be returned as the result.

Query

Column1

         LINK_SOURCE ( "Case_Table_A"."CASE_ID" , "Case_Table_B"."CASE_ID" )
        

Column2

         LINK_TARGET ( "Case_Table_A"."CASE_ID" , "Case_Table_B"."CASE_ID" )
        

Input

Output

Activity_Table_A

CASE_ID : string

ACTIVITY : string

TIMESTAMP : date

ID : string

'1'

'Send Purchase Order'

Wed Jan 01 2020 05:00:00.000

'1a'

'2'

'Clear Invoice 1'

Wed Jan 01 2020 06:00:00.000

'1b'

Activity_Table_B

CASE_ID : string

ACTIVITY : string

TIMESTAMP : date

ID : string

'A'

'Vendor creates Invoice'

Wed Jan 01 2020 05:00:00.000

'2a'

'B'

'Enter in SAP'

Wed Jan 01 2020 06:00:00.000

'2b'

Case_Table_A

CASE_ID : string

OUT : string

IN : string

'1'

'a'

null

'2'

'b'

'c'

Case_Table_B

CASE_ID : string

OUT : string

IN : string

'A'

'c'

'a'

'B'

null

'b'

Foreign Keys

Case_Table_A.CASE_ID

Activity_Table_A.CASE_ID

Case_Table_B.CASE_ID

Activity_Table_B.CASE_ID

Result

Column1 : string

Column2 : string

'1'

'A'

'2'

'B'

'A'

'2'

[4]

This example shows how objects can be connected via Object Link. This scenario has a mapping configuration: "Table_A" and "Table_B"'s ID column can be connected with links. The table "Mapping" contains all existing links.

We query all outgoing links whose source object is in "Table_B" and whose destination object is in "Table_A", which leads to one result link from "A" to "1" with the link attribute of "0.5".

Query

Column1

         LINK_SOURCE ( "Table_B"."ID" )
        

Column2

         LINK_TARGET ( "Table_A"."ID" )
        

Column3

         LINK_ATTRIBUTES ( "Mapping"."VALUE" )
        

Input

Output

Mapping

OUT : string

IN : string

VALUE : float

'A'

'1'

0.5

'2'

'B'

1.3

Table_A

ID : string

'1'

'2'

Table_B

ID : string

'A'

'B'

Result

Column1 : string

Column2 : string

Column3 : float

'A'

'1'

0.5

See also: