create external table emp_part_buck_tb(id int,fname string,lname string,email string,gender string,ip_address string)
partitioned by (country string,state string,city string)
clustered by(id) into 5 buckets
row format delimited
fields terminated by ','
lines terminated by '
'
stored as textfile
location '/empstgnew344'
TBLPROPERTIES("skip.header.line.count"="1");
insert into emp_part_buck_tb partition(country,state,city)
select id,fname,lname,email,gender,ip_address,country, state,city from emp_staging;
Country
>>|__State
>>>>|___City
>>>>>>>>>|___file1
>>>>>>>>>|___file2
>>>>>>>>>|___file3
>>>>>>>>>|___file4
>>>>>>>>>|___file5
Comments
Post a Comment