日付で分割されたテーブルを作成します。ただし、where 句でパーティションを使用することはできません。プロセス step1 は次のとおりです。
CREATE TABLE new_table (
a string,
b string
)
PARTITIONED BY (dt string);
ステップ2:
Insert overwrite table new_table partition (dt=$date)
Select a, b from my_table
where dt = '$date
テーブルが作成されます。
Describe new_table;
a string
b string
dt string
問題:
select * from new_table where dt='$date'
空のセットを返します。
一方
select * from new_table
a、b、および dt を返します。
これの理由が何であるか知っている人はいますか?
ありがとう