I have a requirement to show the name of the TABLE NAME , DATABASE NAME and ROW COUNT of the given table using IMPALA, i am able to show the ROW COUNT and TABLE NAME using below query and got stuck in getting current database name,I actually googled a lot but i didn't find anything related. any one can help me in this?
select count(*) as rowcount,'table name' from table1
union
select count(*) as rowcount,'table name' from table2
union
select count(*) as rowcount,'table name' from table3
union
select count(*) as rowcount,'table name' from table4
From this https://issues.apache.org/jira/browse/IMPALA-675 , you can use select current_database()
to get the database name.