如何通过配置单元表模式推断Parquet模式而不插入任何记录?

4si2a6ki  于 2021-06-01  发布在  Hadoop
关注(0)|答案(0)|浏览(195)

现在给出一个配置单元表及其模式,即:

hive> show create table nba_player;
OK
CREATE TABLE `nba_player`(
  `id` bigint, 
  `player_id` bigint, 
  `player_name` string, 
  `admission_time` timestamp, 
  `nationality` string)
ROW FORMAT SERDE 
  'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe' 
STORED AS INPUTFORMAT 
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat' 
OUTPUTFORMAT 
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
  'hdfs://endpoint:8020/user/hive/warehouse/nba_player'
TBLPROPERTIES (
  'transient_lastDdlTime'='1541140811')
Time taken: 0.022 seconds, Fetched: 16 row(s)

如何在不插入任何记录的情况下推断其Parquet模式?
Parquet地板模式如下所示:

message_meta
{optional int64 id;
 optional int64 player_id;
 optional binary player_name;
 optional timestamp admission_time;
 optional binary nationality;}

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题