设为首页 加入收藏

TOP

Hive基础测试操作
2019-09-17 19:01:21 】 浏览:34
Tags:Hive 基础 测试 操作

一、Hive测试

  1.查看数据库

  show databases;

  2.使用某个数据库,如默认数据库

  user default;

  3.创建表

  create table if not exist itstar(id int,name string);

  4.插入数据

  insert into table itstar values(1,"wyh");

  5.查询

  select * from itstar;

  6.删除表

  drop table itstar;

  7.删除数据库

  create database hive_db;

  drop database if exist hive_db;

  8.退出Hive

  quit;

二、向Hive中的表导入文本数据

  1.在Hive中创建表

  create table students(id int,name string) row format delimited fields terminated by "\t";

  2.导入数据  

  load data local inpath '/root/data/student.txt' into table students;

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇MySQL mysqlbinlog 读取mysql-bin.. 下一篇对于使用JDBC连接mysql数据时The ..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目