hive create table is different than the hive query output, hive by default uses tab as output column separator on console. if you want to change to csv, why don't you just use sed and replace tab with ","
if you want a csv generated out of the query itself then create a temporary external table with "," as separator and then load data using your query . Its a long route. Wait for sometime so that others can reply with better suggestion if mines are not suitable for you On Wed, Jul 10, 2013 at 10:18 AM, kentkong_work <[email protected]>wrote: > ** > hi here, > I create a table like this and put a lot data into it. > then I export query result into csv file like this: > hive -e myquery >> result.csv > > but the csv uses tab as split. > how to make hive use ','? thanks! > > CREATE TABLE if not exists upload_users( > username string, > mobile string, > id_type string, > id_no string, > email string, > address string, > validate_time string > ) partitioned by (fileid string) > row format delimited fields terminated by "\,"; > > > -- Nitin Pawar
