Skip to main content

PQL47 (PQL Function Library - CPM 4.7)

ACTIVITY_COLUMN

Applies to: CELONIS 4.7

Description

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

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

  • When no argument is passed, the activity column of the default 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 ACTIVITY column of the related activity table.

Query

Column1

ACTIVITY_COLUMN ( "Activities"."CASE_ID" )

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'

Thu Jan 02 2020 00:00:00.000

Result

Column1 : STRING

'A'

'B'

'A'

'C'

'D'

[2] In this example, the data model contains one activity table. By passing no arguments to the ACTIVITY_COLUMN function, we refer to the ACTIVITY column of the default activity table.

Query

Column1

ACTIVITY_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

'A'

'B'

'A'

'C'

'D'