hive常用操作

[toc]

建分区表
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
CREATE EXTERNAL TABLE `ods_o_mdt_huawei_log_mdt_h_fenqu`(         
`recloggrpttimestamp` string,
`measstarabsolutetimestamp` string
)
PARTITIONED BY (
`dayid` string,
`hourid` string)
ROW FORMAT SERDE
'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES (
'field.delim'=',',
'serialization.format'=',')
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION
'hdfs://192.168.1.34:9000/apps/hive/warehouse/hiveods.db/ods_o_mdt_huawei_log_mdt_h'
TBLPROPERTIES (
'bucketing_version'='2',
'last_modified_by'='ica',
'last_modified_time'='1607600876',
'transient_lastDdlTime'='1607600876')
文章作者: CYBSKY
文章链接: https://cybsky.top/2022/09/07/cyb-mds/bigdata/Hive/hive常用操作/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 CYBSKY