首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

一个sql生成hive日期维度表

set hive.execution.engine=tez; with dates as ( select date_add("2010-01-01", a.pos) as d from (select posexplode(split(repeat("o", datediff("2030-12-31", "2010-01-01")), "o"))) a ) insert overwrite table dim.dim_date select     d   , date_format(d, 'yyyyMMdd000000') as to_pt            -- 指定分区格式   , date_format(d, 'yyyyMMdd')       as date_yyyymmdd   , trunc(d,'MM')                    as month_first_day    , last_day(d)                      as month_last_day   , date_format(last_day(d),'yyyyMMdd000000')   as month_last_pt   , date_format(d, 'yyyyMM')  as month_yyyymm   , date_format(d, 'yyyy-MM') as month_yyyy_mm   , month(d) as month   , date_format(d, 'u') as week   , date_format(d, 'E') as week_long      , weekofyear(d) as week_of_year   , year(d) as year   , floor(substr(d,6,2)/3.1)*3+1 as quarter   -- , concat_group('"',date_format(d, 'yyyyMM'),'"') as date_yyyymmdd_list   -- 低版本hive group_concat 不可用 from dates

03

建站的灵魂拷问:我的网站做好了,为啥无法搜索到?

随着互联网技术的不断发展,越来越多传统企业开始重视品牌的数字化升级,寻求关于网站搭建的方法与技巧。但是在建站的实践过程中总是会遇到不少难题,例如“我的网站做好了,为啥无法搜索到”?腾讯云就此通过大数据分析,筛选出企业客户最关注的3个问题,为您一探究竟。 1、网站制作好了,为什么无法访问? 当制作好网站后,所有人都关心我的网站什么时候能访问? 小技巧来啦!网站制作好之后,需要完成如下4个步骤,缺一不可。 ①绑定域名,将注册的域名同网站绑定上; ②网站备案,可在控制台---网站建设申请[备案授权码]通过授

03
领券