hive基本操作
- 启动hive
bin/hive

show databases;

use default;

show tables;

create table student(id int,name string);

show tables;

desc teacher;

insert into student values(1000,"ss");

可见插入数据的时候底层为mapreduce
9. 查询表中数据
select * from teacher;

quit;

说明:(查看hive在hdfs中的结构) 数据库:在hdfs中表现为${hive.metastore.warehouse.dir}目录下一个文件夹 表:在hdfs中表现所属db目录下一个文件夹,文件夹中存放该表中的具体数据