How to calculate the length of a string in Apache Pig?

apache-pig

Solution

You can use SIZE for that.

SUBSTRING(division,4,SIZE(division))

Problem

In pig, the `substring` function has three arguments, I need to get the substring from 4th position to length of the string. So I specified: ``` substring(division,4,string.length(division)) ``` It is showing error `Could not resolve string.LENGTH using imports:`. How to find the length of string in pig?

Original source