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