Support Questions

Find answers, ask questions, and share your expertise
Announcements
Welcome to the upgraded Community! Read this blog to see What’s New!

Best way for checking hive table metadata at once

avatar
New Contributor

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

@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

@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
Cloudera Employee

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

Labels