# 数据集市
# 维度设计
# 时间维度
DROP TABLE IF EXISTS dim_date_info; | |
CREATE EXTERNAL TABLE dim_date_info( | |
`date_id` STRING COMMENT '日', | |
`week_id` STRING COMMENT '周ID', | |
`week_day` STRING COMMENT '周几', | |
`day` STRING COMMENT '每月的第几天', | |
`month` STRING COMMENT '第几月', | |
`quarter` STRING COMMENT '第几季度', | |
`year` STRING COMMENT '年', | |
`is_workday` STRING COMMENT '是否是工作日', | |
`holiday_id` STRING COMMENT '节假日' | |
) COMMENT '时间维度表' | |
STORED AS PARQUET | |
LOCATION '/warehouse/cggene/dim/dim_date_info/' | |
TBLPROPERTIES ("parquet.compression"="lzo"); |