hive 数据加载
load
hive> load data [local] inpath '数据的 path' [overwrite] into table tableName [partition (partcol1=val1,…)];
insert
hive> insert into table tableName values ( ), ( ) ...;
hive> insert overwrite table tableName
select id, name from student where month='202108';
hive> from student
insert overwrite table student partition(month='202008')
select id, name where month='202108'
insert overwrite table student partition(month='202009')
select id, name where month='202109';
as select
hive> create table if not exists student_new
as select id, name from student;
location
hive> create external table if not exists student(
id int, name string)
row format delimited fields terminated by '\t'
location '/student;
import
hive> import table student2
from '/user/hive/warehouse/export/student';