Impala 转换函数和其他函数

基于impala 3.2版本

1.转换函数:

CAST(expr AS type)

2.数据类型判断:

TYPEOF(type value)

3.UUID函数

select uuid() UUID;
2e2e4db5-6fe3-436d-92a8-bdecc40f1ddd

4.数据库的辅助信息函数:

4.1 查询登录的数据库:CURREN_DATABASE()

4.2.查询登录的用户:user() ,EFFECTIVE_USER() ,LOGGED_IN_USER() 

4.3查询版本:version()

select version();

impalad version 3.2.0-cdh6.3.2 RELEASE (build 60867a3991e22a74e541ea7332eb9e7a34dca2a5)
Built on Wed Jan 29 22:38:21 PST 2020

4.4. 查询impala中担任coordinator的主机:COORDINATOR()

4.5 休眠函数:sleep(n)

select current_database() DB,user() users,EFFECTIVE_USER() users,LOGGED_IN_USER() users ,pid() PID,COORDINATOR() coordinator ;

db	    users	users	users	pid	coordinator
default	 hive	 hive	 hive	 116720	 sz102.example.com

参考:

https://docs.cloudera.com/documentation/enterprise/latest/topics/impala_conversion_functions.html

https://docs.cloudera.com/documentation/enterprise/latest/topics/impala_misc_functions.html

http://impala.apache.org/docs/build/html/topics/impala_conversion_functions.html

http://impala.apache.org/docs/build/html/topics/impala_misc_functions.html

已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 技术工厂 设计师:CSDN官方博客 返回首页