hadoop - How can I check the database of a table? -
have table name some_table don't know databse belongs to. how check it?
suppose, it's impossible hive level, cause need select database first...
pawel
query metastore directly
demo
hive
create table some_table (i int);
metastore (mysql)
use metastore; select d.name tbls t join dbs d on d.db_id = t.db_id t.tbl_name = 'some_table' ;
+----------+ | name | +----------+ | local_db | +----------+
Comments
Post a Comment