Miscellaneous Functions in Apache Hive & Apache Impala

There are some miscellaneous functions available in the Apache Hive that helps in identifying the current user, logged in user, the version of the application, or the database which is selected for use, are as follows. The most of them are also available in Apache Impala. The behavior of the functions in both Apache Hive and Impala would not vary.

Connected Database in Apache Hive & Impala

Since Impala-shell does not show the database in which we are working or the database to which we are connected, there is a risk of uncertainty and this could lead to the table being dropped from the wrong database. It is indeed advisable to verify the connected database before performing any DDL operation.CURRENT_DATABASE() is the…

Get Version Of Apache Hive

If you are using Apache Hive 2.1.0 or later versions, you can SELECT VERSION() function in the Apache Hive prompt to get the version. Otherwise, you can always get the Hive version in the HDFS terminal using the command below.  [cloudera@quickstart ~]$ hive –version Hope you find this article helpful. Please click on the follow…

Version and Release Build of Impala Daemon

If you want to know in which version of Cloudera / Apache Impala you are working in, type VERSION() in the command line. The complete information about the Impala Daemon along with the Impala shell will be displayed.The VERSION() returns the information such as the precise version number and build date for the impalad daemon…

Logged In User in Apache Impala

This is a continuation post of “Connected User in Impala Daemon”Apart from USER() and Effective_User() there’s one more function that retrieves user information in Apache Impala.The function is LOGGED_IN_USER() which typically returns the same value as USER(). If delegation is enabled, it returns the ID of the delegated user. LOGGED_IN_USER() is an alias of EFFECTIVE_USER()…

Get the Connected User in Apache Hive

Apache Hive introduced a function named “current_user()” from version 1.2.0 which returns the current user name from the authenticator manager configured. It could be the same as the user provided when connecting, but it might be different for certain authentication managers (e.g. HadoopDefaultAuthenticator).  Syntax: hive> current_user() Apache Hive introduced a function named “logged_in_user()” from version 2.2.0…

Connected User in Impala DAEMON

There are two functions to get details about the user who is connected to Impala Daemon. The first is USER() and the second is EFFECTIVE USER(). Both functions show the same username when you execute in ClouderaVM, but there is a distinction between them.Let’s see what USER() function displays:User() function returns the username of the…

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s