Skip to main content

Celonis Product Documentation

CASE_ID_COLUMN
Description

CASE_ID_COLUMN allows to refer the case column of an activity table in the data model without using the exact column name.

Syntax
 CASE_ID_COLUMN ( [ expression ] )
  • When an expression that involves a column of an activity table is passed as an argument, the case column of that activity table is referenced.

  • When no argument is passed, the case column of the default activity table is referenced.

  • When a table reference is passed as an argument, the case column of that activity table is referenced.

Examples

[1]

In this example, the data model contains one activity table. Using a column reference as the input expression, we refer to the CASE_ID column of the related activity table:

Query

Column1

         CASE_ID_COLUMN ( "Activities"."ACTIVITY" )
        

Input

Output

Activities

CASE_ID : string

ACTIVITY : string

TIMESTAMP : date

'1'

'A'

Wed Jan 01 2020 00:00:00.000

'1'

'B'

Thu Jan 02 2020 00:00:00.000

'2'

'A'

Wed Jan 01 2020 00:00:00.000

'2'

'C'

Thu Jan 02 2020 00:00:00.000

'3'

'D'

Wed Jan 01 2020 00:00:00.000

Result

Column1 : string

'1'

'1'

'2'

'2'

'3'

[2]

In this example, the data model contains one activity table. By passing no arguments to the CASE_ID_COLUMN, function, we refer to the CASE_ID column of the default activity table:

Query

Column1

         CASE_ID_COLUMN ( )
        

Input

Output

Activities

CASE_ID : string

ACTIVITY : string

TIMESTAMP : date

'1'

'A'

Wed Jan 01 2020 00:00:00.000

'1'

'B'

Thu Jan 02 2020 00:00:00.000

'2'

'A'

Wed Jan 01 2020 00:00:00.000

'2'

'C'

Thu Jan 02 2020 00:00:00.000

'3'

'D'

Wed Jan 01 2020 00:00:00.000

Result

Column1 : string

'1'

'1'

'2'

'2'

'3'

[3]

In this example, MERGE_EVENTLOG is used to combine two activity tables into one. We can then use CASE_ID_COLUMN to refer to the CASE_ID column of the merged activity table:

Query

Column1

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

Input

Output

ACTIVITIES_BKPF

CASE_ID : string

ACTIVITY : string

TIMESTAMP : date

'C1'

'A'

Wed Jan 01 2020 03:00:00.000

ACTIVITIES_BSEG

CASE_ID : string

ACTIVITY : string

TIMESTAMP : date

'D1'

'X'

Wed Jan 01 2020 01:00:00.000

'D1'

'Y'

Thu Jan 02 2020 01:00:00.000

'D2'

'X'

Wed Jan 01 2020 02:00:00.000

'D2'

'Z'

Thu Jan 02 2020 02:00:00.000

BKPF

CASE_ID : string

'C1'

BSEG

CASE_ID : string

SUPER_CASE_ID : string

'D1'

'C1'

'D2'

'C1'

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

'D1'

'D1'

'D1'

'D2'

'D2'

'D2'

[4]

In this example, the data model contains one activity table. Using a table reference as the input expression, we refer to the CASE_ID column of the related activity table:

Query

Column1

         CASE_ID_COLUMN ( "Activities" )
        

Input

Output

Activities

CASE_ID : string

ACTIVITY : string

TIMESTAMP : date

'1'

'A'

Wed Jan 01 2020 00:00:00.000

'1'

'B'

Thu Jan 02 2020 00:00:00.000

'2'

'A'

Wed Jan 01 2020 00:00:00.000

'2'

'C'

Thu Jan 02 2020 00:00:00.000

'3'

'D'

Wed Jan 01 2020 00:00:00.000

Result

Column1 : string

'1'

'1'

'2'

'2'

'3'