ハイブテーブルからsnappy.parquetファイルを作成しようとしています。その大きなパーティションテーブルはちょっとだけ必要です。これを行う:ハイブ結果が寄木細工ファイルとして保存されます
message hive_schema {
optional int32 _col0;
optional binary _col1 (UTF8);
optional binary _col2 (UTF8);
optional binary _col3 (UTF8);
optional binary _col4 (UTF8);
optional binary _col5 (UTF8);
optional binary _col6 (UTF8);
optional binary _col7 (UTF8);
optional int64 _col8;
optional int64 _col9;
optional int64 _col10;
)
SOURCE_TABLEからすべての列名を失う:それは次のスキーマと000000_0ファイルを作成します
set parquet.compression=SNAPPY;
set hive.exec.compress.output=true;
set hive.exec.compress.intermediate=true;
set hive.exec.parallel=true;
set mapred.output.compress=true;
set mapreduce.output.fileoutputformat.compress=true;
set mapred.compress.map.output=true;
set mapreduce.map.output.compress=true;
set mapred.output.compression.type=BLOCK;
set mapreduce.output.fileoutputformat.compress.type=BLOCK;
set io.seqfile.compression.type = BLOCK;
insert overwrite directory 'EXTERNAL_DIRECTORY' STORED AS PARQUET select * from SOURCE_TABLE;
。私はそれを適切に保存するので、後でハイブテーブルとして使用できますか?
大規模なソースデータセットの1つのパーティションからのみ取得する新しいデータセットを作成しようとしているようですね。もしそうなら、私はちょうど後にある特定のテーブルからすべてのデータを選択している新しい外部ハイブテーブルを作成します。その後、テーブルとディレクトリ/ファイルを利用できるようになります。 – Jared
さて、私は大きなテーブルのカップルパーティションから小さなデータセットを作成しようとしています。私は新しいハイブテーブルを最初に作成してそれを選択しようとします – lacerated