Open Jianmingphua opened 5 years ago
CREATE EXTERNAL TABLE intermediate_media_activity( cust_id int, in_market string, predictors string, demographics string ) row format delimited fields terminated by '\t' stored as textfile LOCATION '/user/cloudera/mediademo/media_customer';
CREATE EXTERNAL TABLE media_activity( cust_id int, in_market string, predictors string, demographics string ) row format delimited fields terminated by '\t' STORED AS PARQUET;
INSERT OVERWRITE TABLE media_activity SELECT * FROM intermediate_media_activity;
select count(*) from media_activity; 4848
CREATE EXTERNAL TABLE intermediate_media_activity( cust_id int, in_market string, predictors string, demographics string ) row format delimited fields terminated by '\t' stored as textfile LOCATION '/user/cloudera/mediademo/media_customer';
CREATE EXTERNAL TABLE media_activity( cust_id int, in_market string, predictors string, demographics string ) row format delimited fields terminated by '\t' STORED AS PARQUET;
INSERT OVERWRITE TABLE media_activity SELECT * FROM intermediate_media_activity;
select count(*) from media_activity; 4848