导出到HDFS
INSERT OVERWRITE DIRECTORY '/user/hive/warehouse/02' row FORMAT DELIMITED fields TERMINATED BY ',' stored as textfile SELECT * from airline;
导出到本地
INSERT OVERWRITE LOCAL DIRECTORY '/root/data/hiveexport' row FORMAT DELIMITED fields TERMINATED BY ',' stored as textfile SELECT * from airline;
使用SQOOP导出到数据库
sqoop import --connect jdbc:mysql://localhost:3306/wht --username root --password cloudera --table wht_test1 --fields-terminated-by ',' --hive-import --hive-table default.wht_test1 --hive-overwrite -m 1