hive日期维度表,常用的字段基本都有。1. 建表语句hive执行以下语句建表。库名表名,存储格式、位置根据需要修改。12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667createtableifnotexistsdatasystem.dim_date(date_idstringcomment'日期(yyyymmdd)',datestrstringcomment'日期(yyyy-mm-dd)',date_namestringcomment'日期名称中文',weekidintcomment'周(0-6,周日~周六)',week_cn_namestringcomment'周_名称_中文',week_en_namestringcomment'周_名称_英文',week_en_nmstringcomment'周_名称_英文缩写',yearmonthidstringcomment'月份id(yyyymm)',yearmonthstrstringcomment'月份(yyyy-mm)',monthidintcomment'月份id(1-12)',monthstrstringcomment'月份',m
...
继续阅读
(149)