文章目录
一、数据准备
hive> create database if not exists myhive;
hive> use myhive;
hive> drop table if exists student;
hive> create table student(
> stuid int,stuname string,stuage int,department string
> )
> row format delimited fields terminated by ' ';
hive> select \* from student;
student.txt 内容如下:
1 tokgo 33 AA
2 chirs 44 CC
3 lucy 55 BB
4 tom 66 DD
5 jack 77 AA
6 john 44 BB
7 alis 77 CC
8 tony 33 CC
9 lelisy 99 DD
10 chery 88 AA

二、分区
hive表就是hdfs的上的一个目录
hive表中的数据,其实就是对应了H

本文详细介绍了Hive中数据准备、创建分区表、分区管理(包括添加、查询、修改和删除分区)、数据导入方法以及分区在实际应用中的操作。强调了系统化学习对于IT技术提升的重要性,并邀请读者加入技术交流社区共同成长。
最低0.47元/天 解锁文章
6322

被折叠的 条评论
为什么被折叠?



