hive

作者: 已不再更新_转移到qiita | 来源:发表于2018-07-18 11:49 被阅读9次

Hive

The Apache Hive data warehouse software facilitates reading, writing, and managing large datasets residing in distributed storage using SQL. Structure can be projected onto data already in storage. A command line tool and JDBC driver are provided to connect users to Hive.

进入hive

hive
hive --service cli
hive -S #静默模式 不打印输出信息

hive命令

show databases;
use <dbname>; -- 连接数据库
show tables;
show functions; --显示内置函数

desc <tbl>;     -- 显示表结构
dfs -ls <dir>;   -- 在hive里显示hdfs的目录
create table person 
(id int,
name string,
married boolean,
salary double);

desc  person;
------------------------------
create table student 
( id int,
  name string,
  grade array<float>);

------------------------------
create table student
( id int,
  name string,
  grade map<string, float>);
------------------------------
create table student
( id int,
  info struct<name: string, age:int, gender: string>
);

hive执行shell命令

!pwd;
!ls;
! cat /proc/cpuinfo;

HQL 查询

select * from tbl; --不会转换为 MapReduce
select title from tbl; -- 转换为 MapReduce

相关文章

  • 数据仓库Hive

    Hive产生背景 Hive概述 HIve体系架构 Hive部署架构 Hive和RDBMS区别 Hive部署以及快速...

  • 数据查询-Hive基础

    outline 什么是Hive 为什么需要Hive Hive的架构 Hive的常用操作 什么是Hive Hive由...

  • 大数据知识 | hive初识

    hive简介 hive架构 hive是什么 官网这样说:https://hive.apache.org/ hive...

  • Hive | Hive 安装详解

    一、Hive 介绍 二、准备工作 三、Hive下载 四、Hive 安装 五、Hive 启动 一、Hive 介绍 H...

  • Hive日常使用

    hive 创建表: hive 执行: =========================hive 调用Python...

  • Hive常用的几种交互操作

    查看hive下的交互命令方式 -help(hive 外) 命令:bin/hive -helpusage: hive...

  • 【Hive】

    Hive的安装 Hive官网地址 http://hive.apache.org/[http://hive.apac...

  • Hive进阶

    hive配置,命令 hive查询显示列名 hive默认分隔符 \001 hive命令行中查看当前hive环境变量 ...

  • Hive 入门

    Hive官网 Hive概述 Hive 的底层执行引擎有 :MapReduce,Tez,Spark- Hive on...

  • 大数据开发之Hive优化篇2-Hive的explain命令

    备注:Hive 版本 2.1.1 一.Hive explain命令概述 Hive的explain命令用来看Hive...

网友评论

      本文标题:hive

      本文链接:https://www.haomeiwen.com/subject/yycopftx.html