[英]Partition file not creating for new hive table created
Table created successfully, but partition not created/ partition file is not creating. 表创建成功,但未创建分区/未创建分区文件。
CREATE EXTERNAL TABLE table_name(col1,col2)
PARTITIONED BY (`biz_dt` date) -- partition created
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
WITH SERDEPROPERTIES('quoteChar'='\"','separatorChar'=',')
STORED AS INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION 'hdfs://path/'
TBLPROPERTIES ('skip.header.line.count'='1','transient_lastDdlTime'='1563368415');
When you create a new table, no files are created. 创建新表时,不会创建任何文件。 It will create only the folder where to store the file (if not exists) and that's all.
它将仅创建用于存储文件的文件夹(如果不存在),仅此而已。 The files will be created in the moment when you insert data into table.
当您将数据插入表时,将立即创建文件。
Also, no partition it's added until you add it (alter table, or dynamically through insert into table). 同样,在添加分区之前,不要添加分区(更改表,或通过插入表动态地添加分区)。
Hope that this it's helping you. 希望这对您有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.