![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
hive
keke24
njupt
展开
-
hive基本命令
查看hive表默认元数据 desc formatted emp; 查看hive表分区 show partitions emp; 修改hive表分区 alter table emp add if not exists partition(dt=‘2017-01-01’); 创建表,以dt字段为分区 create table emp(name string,salary bigint) partiti...原创 2019-05-05 11:55:23 · 287 阅读 · 0 评论 -
将mysql中的表导入到hive
将mysql中指定表的数据导入到hdfs sqoop import -connect jdbc:mysql://XXXXXX/database -username u -password XXXX -table sys_map 查看导入的数据: hadoop fs -cat /user/root/{tableName}/part-m-0000 将mysql中的数据导入到hive(自动创建表结构) ...原创 2019-05-05 11:58:07 · 2710 阅读 · 0 评论