Hive中找出Table和Partition的真实路径。

在Hive中,如果使用了External Table或者Partition,那么路径是不在自己的hive warehouse下的。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
-- 获取table的真实hdfs路径
desc formatted my_table;
-- 获取partition的真实hdfs路径
desc formatted my_table (pt='20140804');
-- 获取table的真实hdfs路径 desc formatted my_table; -- 获取partition的真实hdfs路径 desc formatted my_table (pt='20140804');
-- 获取table的真实hdfs路径
desc formatted my_table;

-- 获取partition的真实hdfs路径
desc formatted my_table (pt='20140804');

 

Leave a Reply

Your email address will not be published. Required fields are marked *