hadoop - How can I wrap the output by double quotes in insert overwrite statements in hive -
this insert overwrite statement:
insert overwrite directory /myworkspace/output/f_name/20150714 select concat_ws('|', coalesce(a,''), coalesce(b,''), coalesce(c,''), coalesce(d,'') ) table_a;
i getting output as:
a|b|c|d
but want output as:
"a"|"b"|"c"|"d"
i not able figure out.
ideally table definition should define format want data output in. insulate doing lot of concat.
in case define table use column delimiter "|" & fields terminated '"'
refer following link : create table hive
Comments
Post a Comment