awk hive使用

CREATE TABLE messages (month STRING, day STRING, time STRING,  lable STRING, ip STRING, href STRING) row format delimited fields terminated by '\t';

LOAD DATA LOCAL INPATH '/home/message_bak' OVERWRITE INTO TABLE messages;

cat messages |awk {'split($7,b,",");print $1"\t"$2"\t"$3"\t"$6"\t"b[1]"\t"$8"\t"'}


CREATE TABLE messages (month STRING)row format delimited fields terminated by '/t';

你可能感兴趣的:(hive)