将分号改为\0731
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23CREATE EXTERNAL TABLE `table`(
`a` string COMMENT '',
`b` string COMMENT '',
`c` string COMMENT '',
`d` int COMMENT '',
`e` string COMMENT '',
`f` string COMMENT '',
`g` string COMMENT '',
`h` int COMMENT '')
PARTITIONED BY (
`dt` string)
ROW FORMAT SERDE
'org.apache.hadoop.hive.serde2.RegexSerDe'
WITH SERDEPROPERTIES (
'input.regex'='(\\d{4}-\\d{2}-\\d{2}\\s*\\d{2}:\\d{2}:\\d{2}).\\d{3}\\s*[A-Z]{3,5}\\s*L:([a-zA-Z0-9_\\-]{1,50}),D:([A-Z0-9_]{1,5}),Mod:([0-9]{1,2}),([a-zA-Z0-9_]{10,30}):([A-Z]{1}),ClientCode:([a-zA-z\\d\\-_\\.\\|]{1,100})(?:,RuleVersion:(\\d{1,3}))\073',
'output.format.string'='%1$s %2$s %3$s %4$s %5$s %6$s %7$s '
)
STORED AS INPUTFORMAT
'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT
'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION
'hdfs://qrcluster/user/abtest/log/abtest_sdk_log_daycombine'