Skip to main content

Celonis Product Documentation

RANGE
Description

With RANGE, a column which is not related to any table in the Data Model, can be created. It is filled with a range of INT or DATE values.

The column can not be joined to any table. It still can be useful to score a range against a machine learning model though.

Syntax
 RANGE ( start_value, step_size, step_count )
  • start_value: Value range should start from (INT or DATE constant)

  • step_size: How big should be a step in the range (INT or STRING constant)

  • step_count: How many steps should be done on the START_VALUE (INT constant)

Step Size for Date constants

If the start value is a date, the following options are available to define the range:

  • h: One hour

  • D: One day

  • M: One month

  • Y: One year

Examples

[1]

Create a range of INTs which starts at 0 and adds four rows in each of which the previous value is incremented by 1:

Query

Column1

         RANGE ( 0 , 1 , 4 )
        

Input

Output

Result

Column1 : int

0

1

2

3

4

[2]

Create a range of DATEs which starts at 01.01.2009 and adds four rows in each of which the previous date is incremented by 1 month:

Query

Column1

         RANGE ( {d '2009-01-01' } , '1M' , 3 )
        

Input

Output

Result

Column1 : date

Thu Jan 01 2009 00:00:00.000

Sun Feb 01 2009 00:00:00.000

Sun Mar 01 2009 00:00:00.000

Wed Apr 01 2009 00:00:00.000

[3]

Create a range of FLOATs which starts at 0.5 and adds four rows in each of which the previous value is incremented by 0.5. Therefore a range with start 1 and stepsize 1 is created and then multiplied by 0.5:

Query

Column1

         RANGE ( 1 , 1 , 4 ) * 0.5
        

Input

Output

Result

Column1 : float

0.5

1.0

1.5

2.0

2.5

See also: