Home > Web Front-end > JS Tutorial > body text

How to perform simple operations on hive

坏嘻嘻
Release: 2018-09-14 14:57:20
Original
2377 people have browsed it

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的任何目录下执行该命令
Copy after login

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
Copy after login

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

cd /usr/local/hive
./bin/hive   //启动Hive
Copy after login

2. hive sql operation

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

How to perform simple operations on hive

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

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template