有人知道如何在配置单元环境中使用select语句获取表的hdfs目录吗

ee7vknir  于 2021-06-26  发布在  Hive
关注(0)|答案(1)|浏览(256)

我使用了select语句,比如'select t**from '来获取配置单元中表的hdfs目录位置。但现在我忘了声明。有人知道吗!谢谢!

nbnkbykc

nbnkbykc1#

我想你需要描述一下。
所需位置: Location: file:/tmp/warehouse/part_table/d= 演示

hive> DESCRIBE formatted part_table partition (d='abc');
OK

# col_name              data_type               comment

i                       int                                        

# Partition Information

# col_name              data_type               comment

d                       string                                     

# Detailed Partition Information

Partition Value:        [abc]                   
Database:               default                 
Table:                  part_table              
CreateTime:             Wed Mar 30 16:57:14 PDT 2016    
LastAccessTime:         UNKNOWN                 
Protect Mode:           None                    

####### HERE IS THE LOCATION YOU WANT ########

Location:               file:/tmp/warehouse/part_table/d=abc 
Partition Parameters:           
    COLUMN_STATS_ACCURATE   true               
    numFiles                1                  
    numRows                 1                  
    rawDataSize             1                  
    totalSize               2                  
    transient_lastDdlTime   1459382234         

# Storage Information

SerDe Library:          org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe      
InputFormat:            org.apache.hadoop.mapred.TextInputFormat        
OutputFormat:                org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat      
Compressed:             No                      
Num Buckets:            -1                      
Bucket Columns:         []                      
Sort Columns:           []                      
Storage Desc Params:            
    serialization.format    1                  
Time taken: 0.334 seconds, Fetched: 35 row(s)

相关问题