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.