Skip to main content

Celonis Product Documentation

DEFAULT ACTIVITY_COLUMN
Description

The DEFAULT ACTIVITY_COLUMN statement can be used to temporarily overwrite the default eventlog for the execution of a single query. The specified column is used whenever an operator would use the activity column of the default eventlog.

Syntax
 DEFAULT ACTIVITY_COLUMN activity_table.column;
  • activity_table.column: String column of the activity table.

Examples

[1]

Query: DEFAULT ACTIVITY_COLUMN "ActivityTable2"."ACTIVITIES";

In this scenario, ActivityTable1 is actually configured as the default event log. However, by using the DEFAULT ACTIVITY_COLUMN statement, the default activity column can be temporarily changed to the activity column of ActivityTable2.

Query

         DEFAULT ACTIVITY_COLUMN "ActivityTable2"."ACTIVITIES";
        

Column1

         CASE_ID_COLUMN ( )
        

Column2

         ACTIVITY_COLUMN ( )
        

Column3

         TIMESTAMP_COLUMN ( )
        

Input

Output

ActivityTable1

CASE_ID : string

ACTIVITIES : string

TIMESTAMP : date

'1'

'A'

Wed Sep 01 2021 14:00:00.000

'1'

'B'

Wed Sep 01 2021 15:00:00.000

'2'

'A'

Wed Sep 01 2021 09:05:00.000

'2'

'C'

Wed Sep 01 2021 10:30:00.000

ActivityTable2

CASE_ID : string

ACTIVITIES : string

TIMESTAMP : date

'3'

'A'

Wed Sep 01 2021 14:00:00.000

'3'

'B'

Wed Sep 01 2021 15:00:00.000

'4'

'B'

Wed Sep 01 2021 15:00:00.000

'5'

'A'

Wed Sep 01 2021 09:05:00.000

'5'

'C'

Wed Sep 01 2021 10:30:00.000

'5'

'D'

Wed Sep 01 2021 10:40:00.000

CaseTable1

CASE_ID : string

'1'

'2'

CaseTable2

CASE_ID : string

'3'

'4'

'5'

Foreign Keys

CaseTable1.CASE_ID

ActivityTable1.CASE_ID

CaseTable2.CASE_ID

ActivityTable2.CASE_ID

Result

Column1 : string

Column2 : string

Column3 : date

'3'

'A'

Wed Sep 01 2021 14:00:00.000

'3'

'B'

Wed Sep 01 2021 15:00:00.000

'4'

'B'

Wed Sep 01 2021 15:00:00.000

'5'

'A'

Wed Sep 01 2021 09:05:00.000

'5'

'C'

Wed Sep 01 2021 10:30:00.000

'5'

'D'

Wed Sep 01 2021 10:40:00.000

[2]

Query: DEFAULT ACTIVITY_COLUMN "ActivityTable2"."ACTIVITIES"; FILTER ACTIVITY_COLUMN ( ) IN ('A', 'D'); DEFAULT ACTIVITY_COLUMN "ActivityTable1"."ACTIVITIES"; FILTER ACTIVITY_COLUMN ( ) IN ('B', 'C');

ActivityTable1 is configured as the default event log. By setting the default eventlog temporarily to ActivityTable2, the first filter actually filters ActivityTable2. Then, the default eventlog can be switched back by using another temporary default eventlog. This implies that the second filter operates on ActivityTable1 again.

Query

         DEFAULT ACTIVITY_COLUMN "ActivityTable2"."ACTIVITIES";
        

Filter

         FILTER ACTIVITY_COLUMN ( ) IN ( 'A' , 'D' );
        
         DEFAULT ACTIVITY_COLUMN "ActivityTable1"."ACTIVITIES";
        

Filter

         FILTER ACTIVITY_COLUMN ( ) IN ( 'B' , 'C' );
        

Column1

         UNION_ALL ( "ActivityTable1"."CASE_ID" , "ActivityTable2"."CASE_ID" )
        

Column2

         UNION_ALL ( "ActivityTable1"."ACTIVITIES" , "ActivityTable2"."ACTIVITIES" )
        

Input

Output

ActivityTable1

CASE_ID : string

ACTIVITIES : string

TIMESTAMP : date

'1'

'A'

Wed Sep 01 2021 14:00:00.000

'1'

'B'

Wed Sep 01 2021 15:00:00.000

'2'

'A'

Wed Sep 01 2021 09:05:00.000

'2'

'C'

Wed Sep 01 2021 10:30:00.000

ActivityTable2

CASE_ID : string

ACTIVITIES : string

TIMESTAMP : date

'3'

'A'

Wed Sep 01 2021 14:00:00.000

'3'

'B'

Wed Sep 01 2021 15:00:00.000

'4'

'B'

Wed Sep 01 2021 15:00:00.000

'5'

'A'

Wed Sep 01 2021 09:05:00.000

'5'

'C'

Wed Sep 01 2021 10:30:00.000

'5'

'D'

Wed Sep 01 2021 10:40:00.000

CaseTable1

CASE_ID : string

'1'

'2'

CaseTable2

CASE_ID : string

'3'

'4'

'5'

Foreign Keys

CaseTable1.CASE_ID

ActivityTable1.CASE_ID

CaseTable2.CASE_ID

ActivityTable2.CASE_ID

Result

Column1 : string

Column2 : string

'1'

'B'

'2'

'C'

'3'

'A'

'5'

'A'

'5'

'D'

[3]

Query: DEFAULT ACTIVITY_COLUMN CASE WHEN "ActivityTable2"."ACTIVITIES" IN ('A', 'B') THEN "ActivityTable2"."ACTIVITIES" ELSE NULL END;

It is also possible to use complex expressions, such as case when statements, inside the DEFAULT ACTIVITY_COLUMN. The resulting column needs to be part of an activity table and be of type STRING.

Query

         DEFAULT ACTIVITY_COLUMN CASE WHEN "ActivityTable2"."ACTIVITIES" IN ( 'A' , 'B' ) THEN "ActivityTable2"."ACTIVITIES" ELSE NULL END;
        

Column1

         CASE_ID_COLUMN ( )
        

Column2

         ACTIVITY_COLUMN ( )
        

Input

Output

ActivityTable1

CASE_ID : string

ACTIVITIES : string

TIMESTAMP : date

'1'

'A'

Wed Sep 01 2021 14:00:00.000

'1'

'B'

Wed Sep 01 2021 15:00:00.000

'2'

'A'

Wed Sep 01 2021 09:05:00.000

'2'

'C'

Wed Sep 01 2021 10:30:00.000

ActivityTable2

CASE_ID : string

ACTIVITIES : string

TIMESTAMP : date

'3'

'A'

Wed Sep 01 2021 14:00:00.000

'3'

'B'

Wed Sep 01 2021 15:00:00.000

'4'

'B'

Wed Sep 01 2021 15:00:00.000

'5'

'A'

Wed Sep 01 2021 09:05:00.000

'5'

'C'

Wed Sep 01 2021 10:30:00.000

'5'

'D'

Wed Sep 01 2021 10:40:00.000

CaseTable1

CASE_ID : string

'1'

'2'

CaseTable2

CASE_ID : string

'3'

'4'

'5'

Foreign Keys

CaseTable1.CASE_ID

ActivityTable1.CASE_ID

CaseTable2.CASE_ID

ActivityTable2.CASE_ID

Result

Column1 : string

Column2 : string

'3'

'A'

'3'

'B'

'4'

'B'

'5'

'A'

'5'

null

'5'

null