0

I tried to concat_ws(string delimiter, array<string>) solution provided in this SO question. However I am getting an error:

Error while compiling statement: FAILED: ClassCastException null

The below statement does work, however you aren't able to select more than two columns other than the array column:

with tbl as (
  select transform(mycolumn, tb_name) using '/bin/cat' as (mycolumnstr, tb_name) 
  from mytable) 
select concat_ws('-', tb_name, mycolumnstr) from tbl;
2
  • Transformation script has to take care about other columns. It's not possible to add column separately using transform(). Read this: andreyfradkin.com/posts/2013/06/15/combining-hive-and-python Commented Dec 11, 2019 at 6:43
  • 1
    Thanks a lot it worked, when other columns are included in the transform Commented Dec 11, 2019 at 9:23

0

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.