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...
10 Answers
DESCRIBE FORMATTED my_table;
or
DESCRIBE FORMATTED my_table PARTITION (my_column='my_value');

- 18,204
- 2
- 36
- 58
-
This answer is excellent... Thank you very much Joe... I can find every thing here about my table. – Muneer Basha Syed Nov 02 '12 at 19:05
-
3This works very fine.. Any idea how we can see all partitions info in one command? – minhas23 Sep 10 '15 at 07:08
-
I have a maprfs system. I am trying to find the location of the file for which hive view is created. I am describing the hive view. but i am not seeing the location option there. Can u help! – semicolon Mar 11 '22 at 10:07
There are three ways to describe a table in Hive.
To see table primary info of Hive table, use describe table_name; command
To see more detailed information about the table, use describe extended table_name; command
To see code in a clean manner use describe formatted table_name; command to see all information. also describe all details in a clean manner.

- 81,827
- 26
- 193
- 197

- 2,992
- 2
- 28
- 31
You can use below commands for the same.
show create table <table>;
desc formatted <table>;
describe formatted <table>;

- 784
- 8
- 19
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.

- 1,871
- 1
- 13
- 18
-
What can I do to see that info for a table in the non default database. I can't provide the database in that command? – ludwigm Jul 11 '13 at 21:48
-
confirmative.DESCRIBE FORMATTED
does work while SHOW CREATE TABLE does not work
– runzhi xiao Aug 30 '18 at 06:05
Further to pensz answer you can get more info using:
DESCRIBE EXTENDED my_table;
or
DESCRIBE EXTENDED my_table PARTITION (my_column='my_value');

- 6,965
- 2
- 29
- 32
All HIVE
managed tables are stored in the below HDFS
location.
hadoop fs -ls /user/hive/warehouse/databasename.db/tablename

- 7,300
- 6
- 36
- 47

- 37
- 1
-
4That looks very specific upon the installation/configuration, no ? – Brian Agnew Apr 20 '16 at 16:51
-
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.

- 406
- 9
- 24