Documente Academic
Documente Profesional
Documente Cultură
use retail_stage;
-----------------------------------------------------LOAD----------------------------------------------------------------
#We cannot use orders and order_items directly as tables in hive database retail_ods are
partitioned
#You can remove overwrite while appending data to underlying hive table
#Launch hive
hive
use retail_ods;
load data inpath '/user/root/departments/*' overwrite into table departments;
hadoop fs -ls /user/root/departments
#You will not find files
---------------------------------------------------------------
INSERT---------------------------------------------------------
#Prepare orders on mysql database
#on mysql
select * from orders into outfile '/tmp/orders.psv' fields terminated by '|' lines terminated by '\n';