建表 插入数据 删除分区
CREATE TABLE test_multiple_partition (
id int,
name STRING
) PARTITIONED BY (etl_tx_dt INT,createTime TIMESTAMP);
INSERT INTO test_multiple_partition PARTITION(etl_tx_dt=20190729, createtime="2019-07-29 12:00:00") VALUES(1, "t1");
INSERT INTO test_multiple_partition PARTITION(etl_tx_dt=20190729, createtime="2019-07-29 13:00:00") VALUES(2, "t2");
SHOW PARTITIONS test_multiple_partition;
ALTER TABLE test_multiple_partition DROP PARTITION (etl_tx_dt=20190729);
统计分区表元数据
ANALYZE TABLE tableName PARTITION(etl_tx_dt=20190729) COMPUTE STATISTICS;
DESCRIBE EXTENDED tableName PARTITION(etl_tx_dt=20190729);
参考
表属性(元数据)
DESCRIBE FORMATTED sda01_mdm_data_object_data_size_info;
DESCRIBE EXTENDED mdm_dev_data_source_size_info;
ALTER TABLE mdm_dev_data_source_size_info SET TBLPROPERTIES ("sync_way"="all");
hive 元数据 mysql存储