GET_RANGE

Returns range of numbers between start and end (inclusive)

Syntax

GET_RANGE(maxLimit, first, last)

Arguments

NameTypeDescriptionDefault Value

maxLimit

int

10000000

first

numeric

last

numeric

Returns

bigint

Examples

maxLimitfirstlastOutput

10000000

0

0

[0]

10000000

0

2

[0, 1, 2]

10000000

5

2

[5, 4, 3, 2]

10000000

1.5

3.5

[2, 3]

10000000

5.2

3.5

[5, 4]

10000000

array[0, 5]

array[2, 7]

[0, 1, 2, 5, 6, 7]

Transformation job example

SQL

CREATE JOB function_operator_example
    ADD_MISSING_COLUMNS = true
    AS INSERT INTO default_glue_catalog.upsolver_samples.orders_transformed_data MAP_COLUMNS_BY_NAME
    SELECT maxLimit, first, last,
        GET_RANGE(10000000, first, last) AS Output
    FROM default_glue_catalog.upsolver_samples.orders_raw_data
    LET maxLimit = 10000000,
        first = 0,
        last = 0
    WHERE time_filter()
    LIMIT 1;

Query result

maxLimitfirstlastOutput

10000000

0

0

[0]

Last updated