第一步:简单流程
创建表:
create table student(
id bigint,
userName string,
password string
)
comment "user table"
row format delimited
fields terminated by '\t'
stored as textfile;

将本地本地文件系统中的userData.txt 加载到student表中
1 rootaaa
2 用户A bbb
load data local inpath '/home/hadoop/hiveTestData/userData.txt' into table student;
加载完成后,就可以在hdfs查看文件目录内容了
hadoop fs -cat /user/hive/warehouse/student/userData.txt
使用Hql查询
hive> select id,username,password from student;
OK1rootaaa2用户AbbbTime taken: 0.127 seconds, Fetched: 2 row(s)

注意:hive不支持inster语句