· 9 years ago · Oct 26, 2016, 06:16 PM
1create external table if not exists pixie.pranavjindal_image_to_language (
2 image_index bigint,
3 language bigint,
4 pin_score FLOAT
5)
6row format delimited fields terminated by ',' lines terminated by '\n'
7 location 's3n://pinlogs/pixie/pranavjindal_image_to_language/';
8
9insert overwrite table pixie.pranavjindal_image_to_language
10
11select t1.image_index, t2.language, t2.pin_score from
12(
13select image_index from pixie.image_index where dt='2016-10-11'
14) t1 LEFT join
15(
16select image_index, language, pin_score from pixie.image_to_pin_language where dt='2016-10-11'
17) t2 on t1.image_index = t2.image_index;