amazon-web-servicesamazon-athena

How to get length of a string column in Athena?


How to get length of a VARCHAR or STRING column in AWS Athena? The AWS Documentation doesn't give any information on a length function, which works equivalent to the LEN() function in Redshift.


Solution

  • The Presto's length() functions works for getting the size of a STRING/VARCHAR column.

    Usage : length(column_name)