I have a requirement to convert a binary to hexadecimal. The issue is very similar to the one mentioned in below link but i need to use java instead of node.js - Converting mongodb Binary _id to LUUID using node
The column value is a binary base64 represented as a data type string in Hive. "AAGOBh3pqkWvtaK8AO2U9w==". The required hex output - '00018e06-1de9-aa45-afb5-a2bc00ed94f7'
I am creating a Hive UDF in Java to do this conversion and I am working on Hive 1.0 version. I wanted to represent (not convert) this string "AAGOBh3pqkWvtaK8AO2U9w==" as a base64 to further convert to hex.
Similar to the node.js example in the above link - var hex = new Buffer(bin, 'base64').toString('hex');
However base64 doesnt seem to be valid.
Is there a way to do it without Hive UDF ? If not, how can we represent (not convert) the string column as a base64 column.
Thanks for your help!!