Skip to main content

Celonis Product Documentation

EVENTLOG_SOURCE_TABLE
Description

For each row of a dynamically created eventlog, EVENTLOG_SOURCE_TABLE will return the activity table name from which the row originates.

Syntax
 EVENTLOG_SOURCE_TABLE ( dynamically-created-eventlog.column )
  • dynamically-created-eventlog.column: Column of a dynamically created eventlog. Example: column of an eventlog created by MERGE_EVENTLOG or CREATE_EVENTLOG.

EVENTLOG_SOURCE_TABLE and Automerge

The automerge table _CEL_MERGED_ACTIVITIES has a column called EVENTLOG_SOURCE which is the result of EVENTLOG_SOURCE_TABLE for this table. Please note that EVENTLOG_SOURCE_TABLE does not accept an automerge table as input.

Examples

[1]

In this scenario, we have two activity tables ACTIVITIES_BKPF and ACTIVITIES_BSEG which are merged using MERGE_EVENTLOG. By using EVENTLOG_SOURCE_TABLE, we obtain the table name for each row from which table it originates from.

Query

Column1

         EVENTLOG_SOURCE_TABLE ( MERGE_EVENTLOG ( "ACTIVITIES_BSEG"."ACTIVITY" , "ACTIVITIES_BKPF"."ACTIVITY" ) )
        

Input

Output

ACTIVITIES_BKPF

CASE_ID : string

ACTIVITY : string

TIMESTAMP : date

'100'

'Vendor creates Invoice'

Mon Feb 01 2016 01:00:00.000

'100'

'Enter in SAP'

Mon Feb 01 2016 02:00:00.000

'200'

'Vendor creates Invoice'

Mon Feb 01 2016 01:00:00.000

'200'

'Enter in SAP'

Mon Feb 01 2016 02:00:00.000

ACTIVITIES_BSEG

CASE_ID : string

ACTIVITY : string

TIMESTAMP : date

'10001'

'Due Date passed'

Mon Feb 01 2016 03:00:00.000

'10001'

'Clear Invoice'

Mon Feb 01 2016 04:00:00.000

'10002'

'Due Date passed'

Mon Feb 01 2016 05:00:00.000

'10002'

'Clear Invoice'

Mon Feb 01 2016 06:00:00.000

'20001'

'Due Date passed'

Mon Feb 01 2016 03:00:00.000

'20001'

'Clear Invoice'

Mon Feb 01 2016 04:00:00.000

BKPF

CASE_ID : string

NETWR : float

'100'

5.0

'200'

10.0

BSEG

CASE_ID : string

SUPER_CASE_ID : string

'10001'

'100'

'20001'

'200'

'10002'

'100'

Foreign Keys

BKPF.CASE_ID

ACTIVITIES_BKPF.CASE_ID

BSEG.CASE_ID

ACTIVITIES_BSEG.CASE_ID

BKPF.CASE_ID

BSEG.SUPER_CASE_ID

Result

Column1 : string

'ACTIVITIES_BKPF'

'ACTIVITIES_BKPF'

'ACTIVITIES_BSEG'

'ACTIVITIES_BSEG'

'ACTIVITIES_BKPF'

'ACTIVITIES_BKPF'

'ACTIVITIES_BSEG'

'ACTIVITIES_BSEG'

'ACTIVITIES_BKPF'

'ACTIVITIES_BKPF'

'ACTIVITIES_BSEG'

'ACTIVITIES_BSEG'

[2]

EVENTLOG_SOURCE_TABLE can also be used to filter out the rows of a certain activity table from a MERGE_EVENTLOG table.

Query

Filter

         FILTER EVENTLOG_SOURCE_TABLE ( MERGE_EVENTLOG ( "ACTIVITIES_BSEG"."ACTIVITY" , "ACTIVITIES_BKPF"."ACTIVITY" ) ) = 'ACTIVITIES_BKPF';
        

Column1

         MERGE_EVENTLOG ( "ACTIVITIES_BSEG"."ACTIVITY" , "ACTIVITIES_BKPF"."ACTIVITY" )
        

Input

Output

ACTIVITIES_BKPF

CASE_ID : string

ACTIVITY : string

TIMESTAMP : date

'100'

'Vendor creates Invoice'

Mon Feb 01 2016 01:00:00.000

'100'

'Enter in SAP'

Mon Feb 01 2016 02:00:00.000

'200'

'Vendor creates Invoice'

Mon Feb 01 2016 01:00:00.000

'200'

'Enter in SAP'

Mon Feb 01 2016 02:00:00.000

ACTIVITIES_BSEG

CASE_ID : string

ACTIVITY : string

TIMESTAMP : date

'10001'

'Due Date passed'

Mon Feb 01 2016 03:00:00.000

'10001'

'Clear Invoice'

Mon Feb 01 2016 04:00:00.000

'10002'

'Due Date passed'

Mon Feb 01 2016 05:00:00.000

'10002'

'Clear Invoice'

Mon Feb 01 2016 06:00:00.000

'20001'

'Due Date passed'

Mon Feb 01 2016 03:00:00.000

'20001'

'Clear Invoice'

Mon Feb 01 2016 04:00:00.000

BKPF

CASE_ID : string

NETWR : float

'100'

5.0

'200'

10.0

BSEG

CASE_ID : string

SUPER_CASE_ID : string

'10001'

'100'

'20001'

'200'

'10002'

'100'

Foreign Keys

BKPF.CASE_ID

ACTIVITIES_BKPF.CASE_ID

BSEG.CASE_ID

ACTIVITIES_BSEG.CASE_ID

BKPF.CASE_ID

BSEG.SUPER_CASE_ID

Result

Column1 : string

'Vendor creates Invoice'

'Enter in SAP'

'Vendor creates Invoice'

'Enter in SAP'

'Vendor creates Invoice'

'Enter in SAP'

[3]

The column EVENTLOG_SOURCE of an automerge table contains the result of EVENTLOG_SOURCE_TABLE.

Query

Column1

         "_CEL_MERGED_ACTIVITIES"."EVENTLOG_SOURCE"
        

Input

Output

Table1_Activity

CASE_ID : string

ACTIVITY : string

TIMESTAMP : date

ADDITION1 : string

ADDITION3 : string

ADDITION5 : string

'100'

'Vendor creates Invoice'

Wed Jan 01 2020 01:00:00.000

'B'

'X'

'R'

'100'

'Enter in SAP'

Wed Jan 01 2020 02:00:00.000

'B'

'X'

'R'

Table1_Case

CASE_ID : string

NETWR : float

'100'

5.0

Table2_Activity

CASE_ID : string

ACTIVITY : string

TIMESTAMP : date

ADDITION1 : string

ADDITION2 : string

ADDITION5 : int

'2001'

'Delete Purchase Order Item'

Wed Jan 01 2020 03:00:00.000

'A'

'X'

10

'2002'

'Record Goods Receipt'

Wed Jan 01 2020 04:00:00.000

'A'

'X'

10

Table2_Case

CASE_ID : string

SUPER_CASE_ID : string

'2001'

'100'

'2002'

'100'

Table3_Activity

CASE_ID : string

ACTIVITY : string

TIMESTAMP : date

ADDITION1 : string

ADDITION4 : string

ADDITION5 : string

'3001'

'Send Purchase Order'

Wed Jan 01 2020 05:00:00.000

'C'

'X'

'S'

'3002'

'Clear Invoice 1'

Wed Jan 01 2020 06:00:00.000

'C'

'X'

'S'

Table3_Case

CASE_ID : string

SUPER_CASE_ID : string

'3001'

'100'

'3002'

'100'

Foreign Keys

Table1_Case.CASE_ID

Table1_Activity.CASE_ID

Table2_Case.CASE_ID

Table2_Activity.CASE_ID

Table3_Case.CASE_ID

Table3_Activity.CASE_ID

Table1_Case.CASE_ID

Table2_Case.SUPER_CASE_ID

Table1_Case.CASE_ID

Table3_Case.SUPER_CASE_ID

Result

Column1 : string

'Table1_Activity'

'Table1_Activity'

'Table2_Activity'

'Table3_Activity'

'Table3_Activity'

'Table1_Activity'

'Table1_Activity'

'Table2_Activity'

'Table3_Activity'

'Table3_Activity'

[4]

By using EVENTLOG_SOURCE_TABLE on a CREATE_EVENTLOG column we obtain the name of the source event table from which each of the rows originates.

Query

Column1

         CREATE_EVENTLOG("o_celonis_obj_1")."LEAD_OBJECT_ID"
        

Column2

         CREATE_EVENTLOG("o_celonis_obj_1")."ACTIVITY"
        

Column3

         EVENTLOG_SOURCE_TABLE ( CREATE_EVENTLOG("o_celonis_obj_1")."ACTIVITY" )
        

Input

Output

e_celonis_event_A

ID : string

TIME : date

'0'

Sat Jan 01 2022 00:00:00.000

'1'

Tue Jan 04 2022 00:00:00.000

'2'

Thu Jan 06 2022 00:00:00.000

e_celonis_event_B

ID : string

TIME : date

OBJECT_ID : string

'005'

Sun Jan 09 2022 00:00:00.000

'X'

e_celonis_event_C

ID : string

TIME : date

OBJECT_ID : string

'007'

Fri Jan 07 2022 00:00:00.000

'Y'

e_celonis_event_E

ID : string

TIME : date

OBJECT_ID : string

'006'

Mon Jan 10 2022 00:00:00.000

'X'

e_celonis_mixed_event_B

ID : string

TIME : date

PHONE : string

'001'

Sun Jan 02 2022 00:00:00.000

null

'002'

Mon Jan 03 2022 00:00:00.000

'01768'

'004'

Tue Jan 11 2022 00:00:00.000

'01273'

e_celonis_mixed_event_C

ID : string

TIME : date

PHONE : string

'003'

Wed Jan 05 2022 00:00:00.000

'01273'

e_celonis_mixed_event_D

ID : string

TIME : date

PHONE : string

'020'

Sat Jan 08 2022 00:00:00.000

null

o_celonis_obj_1

ID : int

Data : string

Obj2_ID : string

0

'foo'

'X'

1

'bar'

'X'

2

'This is a longer string'

'Y'

o_celonis_obj_2

ID : string

Value : int

'X'

100

'Y'

250

r_e_celonis_obj_1_event_A

OBJECT_ID : int

ID : string

0

'0'

0

'1'

1

'0'

r_e_celonis_obj_1_mixed_events_B

OBJECT_ID : int

ID : string

2

'004'

r_e_celonis_obj_1_mixed_events_C

OBJECT_ID : int

ID : string

0

'003'

r_e_celonis_obj_1_mixed_events_D

OBJECT_ID : int

ID : string

2

'020'

r_e_celonis_obj_2_mixed_events_B

OBJECT_ID : string

ID : string

'Y'

'001'

r_e_celonis_obj_2_mixed_events_C

OBJECT_ID : string

ID : string

'Y'

'003'

'X'

'003'

r_e_celonis_obj_2_mixed_events_D

OBJECT_ID : string

ID : string

'Y'

'020'

Foreign Keys

o_celonis_obj_2.ID

o_celonis_obj_1.Obj2_ID

o_celonis_obj_2.ID

e_celonis_event_B.OBJECT_ID

o_celonis_obj_2.ID

e_celonis_event_E.OBJECT_ID

o_celonis_obj_2.ID

e_celonis_event_C.OBJECT_ID

e_celonis_event_A.ID

r_e_celonis_obj_1_event_A.ID

o_celonis_obj_1.ID

r_e_celonis_obj_1_event_A.OBJECT_ID

e_celonis_mixed_event_C.ID

r_e_celonis_obj_1_mixed_events_C.ID

o_celonis_obj_1.ID

r_e_celonis_obj_1_mixed_events_C.OBJECT_ID

e_celonis_mixed_event_B.ID

r_e_celonis_obj_1_mixed_events_B.ID

o_celonis_obj_1.ID

r_e_celonis_obj_1_mixed_events_B.OBJECT_ID

e_celonis_mixed_event_D.ID

r_e_celonis_obj_1_mixed_events_D.ID

o_celonis_obj_1.ID

r_e_celonis_obj_1_mixed_events_D.OBJECT_ID

e_celonis_mixed_event_B.ID

r_e_celonis_obj_2_mixed_events_B.ID

o_celonis_obj_2.ID

r_e_celonis_obj_2_mixed_events_B.OBJECT_ID

e_celonis_mixed_event_C.ID

r_e_celonis_obj_2_mixed_events_C.ID

o_celonis_obj_2.ID

r_e_celonis_obj_2_mixed_events_C.OBJECT_ID

e_celonis_mixed_event_D.ID

r_e_celonis_obj_2_mixed_events_D.ID

o_celonis_obj_2.ID

r_e_celonis_obj_2_mixed_events_D.OBJECT_ID

Result

Column1 : int

Column2 : string

Column3 : string

0

'e_celonis_event_A'

'e_celonis_event_A'

0

'e_celonis_event_A'

'e_celonis_event_A'

0

'e_celonis_mixed_event_C'

'e_celonis_mixed_event_C'

1

'e_celonis_event_A'

'e_celonis_event_A'

2

'e_celonis_mixed_event_D'

'e_celonis_mixed_event_D'

2

'e_celonis_mixed_event_B'

'e_celonis_mixed_event_B'