Applies to: CELONIS 4.2 CELONIS 4.3 CELONIS 4.4
Description
Variant aggregates all activities of a case into a string, which represents a variant of the process.
Syntax
VARIANT ( table.column )
- column: String column which has to be joinable to the activity table.
SHORTENED ( VARIANT ( table.column ) )
- column: String column which has to be joinable to the activity table.
SHORTENED
SHORTENED reduces all loops to simple loops. It can be used to reduce the number of variants without loosing any significant information.
Input column
The input column doesn't have to be necessary an activity column. Other string columns are also possible. This way it is also possible to create variants based on a resource column. Or activities can be grouped together by mapping activity names e.g. with REMAP_VALUES. VARIANT ignores null values.
Examples
This example shows how VARIANT takes all activities per case and creates variants out of it.
Query
Column1
"Table1_CASES"."CASE_ID"
Column2
VARIANT("Table1"."ACTIVITY")
Input
Table1
CASE_ID : INT | ACTIVITY : STRING | TIMESTAMP : DATE |
---|---|---|
1 | 'A' | Sun Jan 01 2017 13:00:00.000 |
1 | 'B' | Sun Jan 01 2017 13:01:00.000 |
1 | 'C' | Sun Jan 01 2017 13:02:00.000 |
2 | 'A' | Sun Jan 01 2017 13:03:00.000 |
2 | 'B' | Sun Jan 01 2017 13:04:00.000 |
2 | 'B' | Sun Jan 01 2017 13:05:00.000 |
2 | 'C' | Sun Jan 01 2017 13:06:00.000 |
3 | 'A' | Sun Jan 01 2017 13:07:00.000 |
3 | 'B' | Sun Jan 01 2017 13:08:00.000 |
3 | 'B' | Sun Jan 01 2017 13:09:00.000 |
3 | 'B' | Sun Jan 01 2017 13:10:00.000 |
3 | 'C' | Sun Jan 01 2017 13:11:00.000 |
If SHORTENED is applied to VARIANT reduces the loop in case three to a simple loop.
Query
Column1
"Table1_CASES"."CASE_ID"
Column2
SHORTENED(VARIANT("Table1"."ACTIVITY"))
Input
Table1
CASE_ID : INT | ACTIVITY : STRING | TIMESTAMP : DATE |
---|---|---|
1 | 'A' | Sun Jan 01 2017 13:00:00.000 |
1 | 'B' | Sun Jan 01 2017 13:01:00.000 |
1 | 'C' | Sun Jan 01 2017 13:02:00.000 |
2 | 'A' | Sun Jan 01 2017 13:03:00.000 |
2 | 'B' | Sun Jan 01 2017 13:04:00.000 |
2 | 'B' | Sun Jan 01 2017 13:05:00.000 |
2 | 'C' | Sun Jan 01 2017 13:06:00.000 |
3 | 'A' | Sun Jan 01 2017 13:07:00.000 |
3 | 'B' | Sun Jan 01 2017 13:08:00.000 |
3 | 'B' | Sun Jan 01 2017 13:09:00.000 |
3 | 'B' | Sun Jan 01 2017 13:10:00.000 |
3 | 'C' | Sun Jan 01 2017 13:11:00.000 |
Here is an example in which instead of the ACTIVITY column another column is used as input for VARIANT.
Query
Column1
"Table1_CASES"."CASE_ID"
Column2
VARIANT("Table1"."COUNTRY")
Null values are ignored by VARIANT.
Query
Column1
"Table1_CASES"."CASE_ID"
Column2
VARIANT("Table1".ACTIVITY)