Home  >  Article  >  Web Front-end  >  How to perform simple operations on hive

How to perform simple operations on hive

坏嘻嘻
坏嘻嘻Original
2018-09-14 14:57:202343browse

Building the graphical interface of Hive. Adding the war package to the lib directory of hive requires everyone to learn patiently.

1. Start hive

Because you need to save Hive metadata with the help of MySQL, please start it first MySQL database

service mysql start # 可以在Linux的任何目录下执行该命令

Since Hive is a data warehouse based on Hadoop, query statements written in HiveQL language will eventually be automatically parsed by Hive into MapReduce tasks and executed by Hadoop. Therefore, Hadoop needs to be started and then started again. Hive.

cd /usr/local/hadoop
./sbin/start-dfs.sh

Next, continue to execute the following command to start entering Hive:

cd /usr/local/hive
./bin/hive   //启动Hive

2. hive sql operation

create database dbtaobao;
use dbtaobao;
show tables;   #显示全部表格
show create table user_log; -- 查看user_log表的各种属性;

How to perform simple operations on hive

desc user_log;    --显示表的简单结构

How to perform simple operations on hive

Related recommendations:

Hive installation introduction

Hive command line

The above is the detailed content of How to perform simple operations on hive. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn