Back

HIVE


Create Internal Database

create database database1 location '/user/jpcloud/database1.db';

Create table from existing table

use database1
create table test2 as select * from test1;

Create table from 2 column tab-delimited file

create table table1(field1 int, field2 string) row format delimited fields terminated by '/t';

load data inpath '/user/hdfs/data.txt' into table table1;