View the storage path for hive tables on HDFs

Source: Internet
Author: User

1. Execute hive and go to hive window

2, execute Show databases, view all the database;

3, execute use Origin_ennenergy_onecard; Use the Origin_ennenergy_onecard database

4, execute Show create table m_bd_t_gas_order_info_h; You can view the storage path of table on HDFs

As follows:

Hive (Origin_ennenergy_onecard) > Show create Table M_bd_t_gas_order_info_h; Ok
CREATE TABLE ' M_bd_t_gas_order_info_h ' (
' Fguid ' string,
' Fstationno ' string,
' Fstationname ' string,
' Fgunno ' int,
' Fserialno ' int,
' Fgas ' double,
' Fprice ' double,
' Fmoney ' double,
' Fsumgas ' double,
' Ftradedatetime ' date,
' Fstopdatetime ' date,
' Fsavedatetime ' date,
' Ffueltype ' string,
' Recorddate ' date)
ROW FORMAT Delimited
Fields TERMINATED by ' \ t '
STORED as InputFormat
' Org.apache.hadoop.mapred.TextInputFormat '
OutputFormat
' Org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat '
Location
' Hdfs://mycluster/user/hive/warehouse/origin_ennenergy_onecard.db/m_bd_t_gas_order_info_h '-----The red part of the HDFS path
Tblproperties (
' Column_stats_accurate ' = ' true ',
' Numfiles ' = ' 6 ',
' NumRows ' = ' 3546198 ',
' Rawdatasize ' = ' 435279808 ',
' TotalSize ' = ' 438826006 ',
' Transient_lastddltime ' = ' 1468831756 ')
Time taken:0.279 seconds, fetched:30 row (s)


Note:

Hive Other Commands:

Show functions-----> See all Hive Functions

Desc tablesname------> View Table structure



Thanks for the "Sborgite" reminder.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.