right(value: string, length: int64) -> string

Returns the rightmost length Unicode characters of value. If value or length is null, the result is null. A negative length is clamped to zero, yielding an empty string. If length is larger than the string, the entire string is returned.

Domain

This is a scalar function (calculates a single output value for a single input row).

Categories

Examples

make_col extension: right(filename, 4)

Extracts the last four characters, typically a file extension such as .json, from each filename.