blob: 82dcce945595840f5ac6ba372208bd41eafc2346 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
set hive.test.mode=true;
set hive.test.mode.prefix=;
create table exim_employee ( emp_id int comment "employee id")
comment "employee table"
partitioned by (emp_country string comment "two char iso code", emp_state string comment "free text")
stored as textfile
tblproperties("creator"="krishna");
load data local inpath "../../data/files/test.dat"
into table exim_employee partition (emp_country="in", emp_state="tn");
load data local inpath "../../data/files/test.dat"
into table exim_employee partition (emp_country="in", emp_state="ka");
load data local inpath "../../data/files/test.dat"
into table exim_employee partition (emp_country="us", emp_state="tn");
load data local inpath "../../data/files/test.dat"
into table exim_employee partition (emp_country="us", emp_state="ka");
dfs ${system:test.dfs.mkdir} target/tmp/ql/test/data/exports/exim_employee/temp;
dfs -rmr target/tmp/ql/test/data/exports/exim_employee;
export table exim_employee to 'ql/test/data/exports/exim_employee';
drop table exim_employee;
create database importer;
use importer;
import table exim_employee partition (emp_country="us") from 'ql/test/data/exports/exim_employee';
describe extended exim_employee;
select * from exim_employee;
drop table exim_employee;
dfs -rmr target/tmp/ql/test/data/exports/exim_employee;
drop database importer;
|