5
Load data into hive USING CSV DATA

Load data into hive and csv

Embed Size (px)

Citation preview

Page 1: Load data into hive and csv

Load data into hiveUSING CSV DATA

Page 2: Load data into hive and csv

Create a table in hive using shell

CREATE TABLE remesas (fecha date,remesas_familiares double,remesas_money_order double,remesas_cheques double,remesas_transferencias double,remesas_efectivo double,remesas_total double) row format delimited fields terminated by ',';

Page 3: Load data into hive and csv

Show tables, display fields

hive> show databases; hive> describe remesas;

Page 4: Load data into hive and csv

Load data into table remesas from csv file

LOAD DATA LOCAL INPATH '/home/hadoop/Downloads/remesas.csv' OVERWRITE INTO TABLE remesas;

Page 5: Load data into hive and csv

Display data loaded in remesas

This is only a sample about loading data, we will cover more details later

Select * from remesas