尚方宝剑之说
创建表CREATE TABLE `YDDT` ( `ID` string, `YDJC_ID` string, `YDDT_DATA_TYPE` string, `YDDT_BUSSINESS_NOW` bigint, `YDDT_USER_NOW` bigint, `YDDT_COLLECT_TIME` string, `YDDT_CREATOR` string, `YDDT_DATE` string, `BACK` string) PARTITIONED BY (day int) row format delimited fields terminated by '\t';数据导入sqoop import --connect jdbc:mysql://172.20.13.50:3306/TestBigDate --username root --password 123456 --table YDDT_2017_06_01 -m 3 --target-dir /user/hive/warehouse/dxyjpt.db/yddt/day=20170601 --fields-terminated-by '\t'标记表的分区信息alter table yddt add partition(day='20170601') location '/user/hive/warehouse/dxyjpt.db/yddt/day=20170601'原文:https://blog.csdn.net/weibin_6388/article/details/78192658