
hive
刀砍磁感线
这个作者很懒,什么都没留下…
展开
-
hive 创建/删除/截断 表(翻译自Hive wiki)
转自:http://www.cnblogs.com/ggjucheng/archive/2013/01/04/2844393.html这里罗列常用操作,更多参考 https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Create%2FDrop%2FTruncateTab转载 2015-06-18 12:59:06 · 558 阅读 · 0 评论 -
hive数据操作
转自:http://www.cnblogs.com/ggjucheng/archive/2013/01/04/2844673.htmlhive有两种数据修改方式从文件加载到hive表加载数据到表时,hive不会做任何转换。加载操作是纯粹的复制/移动操作,移动数据文件到相应的hive表。语法LOAD DATA [LOCAL] INPATH 'fil转载 2015-06-18 12:56:49 · 627 阅读 · 0 评论 -
hive 查询结果导入 local 与 HDFS
导入本地:insert overwrite local directory '/mnt/spark-tmp/apps.txt' row format delimited fields terminated by ',' select * from aaa limit 10000;导入HDFS:insert overwrite directory '/mnt/spa原创 2015-07-08 17:36:52 · 800 阅读 · 0 评论 -
sqoop 导出 hive分区表 数据到 mysql
./sqoop export --connect jdbc:mysql://localhost:3306/test --username root --password 123456 --table pptr --export-dir /user/hive/warehouse/moji.db/ttpr/part_date=2015-06-16/part_type=1 --input-fields-原创 2015-07-02 12:23:15 · 8885 阅读 · 3 评论 -
查询方式创建hive新表,并制定相应分隔符
命令:CREATE TABLE tablename_temp # 创建表row format delimited fields terminated by ',' #指定分隔符号AS select filed1,filed2 from tablename order by filed1 desc limit 20; #查询方式获取数据源原创 2015-07-02 12:35:08 · 1232 阅读 · 0 评论