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?
You can use SIZE for that.
SUBSTRING(division,4,SIZE(division))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With