I want to convert the ascii value to my character in hive.Is there is any existing function in the hive (for example we have a char function in SQL server). Does anyone know how to achieve this in a hive?
Example: for 65, the result is A.
Thanks in advance.
This is possible by combining several built-in functions:
Select decode(unhex(hex(65)), 'US-ASCII');
hex changes the int value to a hexadecimal string and unhex changes that to binary. then decode interprets the binary as ASCII data.
hex
unhex
decode