管理表中装载数据
1 往表中装载数据的唯一方法是使用一种大量的 数据装载 操作
hive >load data local path '${env:HOME}/california-employee'
>overwrite into table employee
>parition (country='US',state='CA');
记住这里的形式
load data ... (overwrite) into table ... (partition)
2 通过查询语句向表中插入数据
insert override table employees
partition (country='US',state='OR')
select * from staged_employees se (注释:这个地方是将staged_employees 修改成了se)
where se.cnty='US' and se.st='OR';
记住这里的形式
insert (overwrite) table table_name1
(partion)...
select...from table_name2 where ...;
这种形式是将一个表中的数据导入到另外一个表中。
from staged_employees se
insert overwrite table employees
partition (country ='US',state='OR')
select * where se.cnty='US' and s
1 往表中装载数据的唯一方法是使用一种大量的 数据装载 操作
hive >load data local path '${env:HOME}/california-employee'
>overwrite into table employee
>parition (country='US',state='CA');
记住这里的形式
load data ... (overwrite) into table ... (partition)
2 通过查询语句向表中插入数据
insert override table employees
partition (country='US',state='OR')
select * from staged_employees se (注释:这个地方是将staged_employees 修改成了se)
where se.cnty='US' and se.st='OR';
记住这里的形式
insert (overwrite) table table_name1
(partion)...
select...from table_name2 where ...;
这种形式是将一个表中的数据导入到另外一个表中。
from staged_employees se
insert overwrite table employees
partition (country ='US',state='OR')
select * where se.cnty='US' and s