- 博客(7)
- 收藏
- 关注
原创 hive创建分区表 hive添加分区 hive删除分区
创建外部分区表create external table if not exists 表名 (id int comment '唯一id',name string comment '姓名',age string commnet '年龄')partitioned by(dt string);不指定表的路径默认存放在hdfs默认路径下1.给表添加分区alter table 表名 add if not exists partitions(dt='2021-11-11');2.添加.
2021-12-02 21:49:23
16831
2
原创 hive 日期和时间戳互相转化
一 . 日期转时间戳1 unix_timestamp()获取当前时间戳select unix_timestamp(); --16364622392 unix_timestamp() 输入日期参数 输入的时间格式必须符合 yyyy-MM-dd HH:mm:ssselect unix_timestamp('2021-11-11 11:11:11'); --16366002713unix_timestamp() 输入日期参数,并指定日期格式 时间格式指定错 返回...
2021-11-09 21:21:31
16661
3
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人