- ROW FORMAT SERDE 수정
- serde properties에
timestamp.formats
지정
- JSON만 됨
CREATE EXTERNAL TABLE IF NOT EXISTS `wscc-database`.`sibalzzzz` (
`time` timestamp,
`status_code` string,
`request_ip` string,
`method` string,
`path` string
)
ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'
WITH SERDEPROPERTIES (
'ignore.malformed.json' = 'FALSE',
'dots.in.keys' = 'FALSE',
'case.insensitive' = 'TRUE',
'mapping' = 'TRUE',
'timestamp.formats' = 'yyyy/MM/dd - HH:mm:ss'
)
STORED AS INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION 's3://sksmsansdj/10/'
TBLPROPERTIES ('classification' = 'json', 'timestamp.formats' = 'yyyy/MM/dd - HH:mm:ss');