presto 获取hive 表最大分区

 

-- presto 语法
select max(element_at(split("$path",'/'),9)) AS part from table_name ;

-- hive 语法
show PARTITION table_name

hive 语法参考官网:https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL

presto 参考:https://www.thinbug.com/q/42990051

防止链接失效 截图 :

 

 

 

 

posted @ 2021-08-24 17:06  linbo.yang  阅读(721)  评论(0编辑  收藏  举报