Description
Calculates the number of elements based on the data type.
Syntax
SIZE(expression)
Examples
SIZE('Australia')
returns 9
Notes
For the following data types, SIZE returns:
- int - 1
- long - 1
- float - 1
- double - 1
- string - number of characters in the string
- bytearray - number of bytes in the array
- bag - returns number of items in bag
- map - returns number of key/value pairs in map
Return value datatype
Long
Impact of null value
If input is null, job fails.