这篇文章主要介绍了Hive2如何导出,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。
一、导出
1.导入到本地文件系统中
hive> show tables; OK location temperature windspeed Time taken: 0.679 seconds, Fetched: 3 row(s) hive> insert overwrite local directory '/home/hadoop/data' > select * from location; ... ... ... [hadoop@hftclclw0001 data]$ pwd /home/hadoop/data [hadoop@hftclclw0001 data]$ ll total 4 -rw-r--r-- 1 hadoop root 113 Oct 27 09:05 000000_0 [hadoop@hftclclw0001 data]$ cat 000000_0 Adelaide6769 Clean_Air900 Faraday6564 Grytviken5436 Halley7526 Neumayer708 Rothera6768 Signy6045
2.导出到HDFS中
hive> show tables; OK location temperature windspeed Time taken: 0.679 seconds, Fetched: 3 row(s) hive> insert overwrite directory '/user/user01/data' > select * from location; ... ... ...
感谢你能够认真阅读完这篇文章,希望小编分享的“Hive2如何导出”这篇文章对大家有帮助,同时也希望大家多多支持亿速云,关注亿速云行业资讯频道,更多相关知识等着你来学习!
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/230279.html