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 function that returns the database that the session is currently using, either default if no database has been selected, or whatever database the session switched to through a USE statement or the impalad -d option.



Leave a Reply

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

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

Facebook photo

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

Connecting to %s