Hive 测试case when 语句

hive> set a = "2021-04-23 00:00:00";
hive> select case when ${hiveconf:a} is not null then ${hiveconf:a} end;
2021-04-23

 

关于${hiveconf:变量名}这个语法,可以参考https://blog.csdn.net/mostermoonsky/article/details/111273157

 

posted @ 2021-04-23 17:15  梦醒江南·Infinite  阅读(200)  评论(0)    收藏  举报