I am trying to paste a string and int from map in Hive to an array. For now, record looks like this:


Is there a way to convert it to an array like this:


1 Answer 1


Assuming your map is called "M" and you want your array field to be called "A"

      concat_ws(":","string3",M[3]) as A
FROM table;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.