Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Best way for checking hive table metadata at once

avatar
New Member

I want to check metadata of table such as column ,data type, and table name . So I tried to access hive meta store in mysql. I tried this query on mysql,I get the following Error.(I tried same query using root user, but it didn't work.)

How can I see this table?? or What is the best way for checking table metadata at once?

[maria_dev@sandbox-hdp ~]$ mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1532
Server version: 5.6.38 MySQL Community Server (GPL)


Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> SELECT * FROM hive.COLUMNS_V2;
ERROR 1142 (42000): SELECT command denied to user ''@'localhost' for table 'COLUMNS_V2'
1 ACCEPTED SOLUTION

avatar
Super Guru

@tomoya yoshida,

Can you try connecting to mysql as below

mysql -uhive -p{password}

password is the password which you hive in ambari GUI while adding hive service.

Thanks,

Aditya

View solution in original post

2 REPLIES 2

avatar
Super Guru

@tomoya yoshida,

Can you try connecting to mysql as below

mysql -uhive -p{password}

password is the password which you hive in ambari GUI while adding hive service.

Thanks,

Aditya

avatar
Contributor

You can also run DESC <TABLE_NAME> command from CLI or BEELINE.