Comandos Hive SQL
Comandos Hive SQL
Comandos
Hive
Comandos DDL (DATA DEFINITION LANGUAGE)
❑CREATE TABLE
❑Create/Drop/Alter/Use Database create table table_name (
id int,
❑Create/Drop/Truncate Table dtDontQuery string,
❑Alter Table/Partition/Column name string
)
❑Create/Drop/Alter View partitioned by (date string)
❑Create/Drop/Alter Index
Create database db1
❑Create/Drop Macro
❑……
Hive
Comandos DML (DATA MANIPULATION LANGUAGE)
❑LOAD LOAD DATA LOCAL INPATH '/home/curso/Escritorio/employee.txt'
OVERWRITE INTO TABLE employee_internal;
❑INSERT
❑UPDATE INSERT INTO TABLE students
❑DELETE VALUES ('fred flintstone', 35, 1.28), ('barney rubble', 32, 2.32);
❑MERGE
DELETE FROM students WHERE gpa <= 1,0;
Mathematical Functions
Collection Functions
Type Conversion Functions
Date Functions
Conditional Functions
String Functions
Misc Functions
Hive
Comandos SELECT
SELECT * FROM employee WHERE salary>30000;