hive數據庫導入與導出


原文連接:https://www.cnblogs.com/654wangzai321/p/9970321.html

把Hive表數據導入到本地

table->local file
insert overwrite local directory '/root/hive_test/1.txt' select * from behavior_table;

 

把Hive表數據導入到HDFS上

table->hdfs file
insert overwrite directory '/root/hive_test/1.txt' select * from behavior_table;

 

 把本地數據導入到Hive表中

local file -> table
LOAD DATA LOCAL INPATH '/root/hive_test/a.txt' OVERWRITE INTO TABLE behavior_table;

 

把HDFS上的數導入到HIve表中

hdfs file -> table
LOAD DATA INPATH '/a.txt' OVERWRITE INTO TABLE behavior_table;


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM