I have created a table in hive, I would like to kn

2019-02-04 05:25发布

I have created a table in hive, I would like to know which directory my table is created in? I would like to know the path...

标签: hive hiveql
10条回答
Evening l夕情丶
2楼-- · 2019-02-04 05:54

To see the structure of table (using create statement)-

show create table table_name;
查看更多
萌系小妹纸
3楼-- · 2019-02-04 05:57
DESCRIBE FORMATTED <tablename>

or

DESCRIBE EXTENDED <tablename>

I prefer formatted because it is more human readable format

查看更多
The star\"
4楼-- · 2019-02-04 06:00

in hive 0.1 you can use SHOW CREATE TABLE to find the path where hive store data.

in other versions, there is no good way to do this.

upadted:

thanks Joe K

use DESCRIBE FORMATTED <table> to show table information.

ps: database.tablename is not supported here.

查看更多
Rolldiameter
5楼-- · 2019-02-04 06:04

in the 'default' directory if you have not specifically mentioned your location.

you can use describe and describe extended to know about the table structure.

查看更多
爷、活的狠高调
6楼-- · 2019-02-04 06:06

Further to pensz answer you can get more info using:

DESCRIBE EXTENDED my_table;

or

DESCRIBE EXTENDED my_table PARTITION (my_column='my_value');
查看更多
疯言疯语
7楼-- · 2019-02-04 06:10

DESCRIBE FORMATTED my_table;

or

DESCRIBE FORMATTED my_table PARTITION (my_column='my_value');

查看更多
登录 后发表回答