Created
December 13, 2016 20:02
-
-
Save guitarrapc/c07bd7dc52935aee36e78ac178ef940d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE EXTERNAL TABLE IF NOT EXISTS s3_accesslogsdb.hogemogeTestTest_contoso_com( | |
BucketOwner string, | |
Bucket string, | |
RequestDateTime string, | |
RemoteIP string, | |
Requester string, | |
RequestID string, | |
Operation string, | |
Key string, | |
RequestURI_operation string, | |
RequestURI_key string, | |
RequestURI_httpProtoversion string, | |
HTTPstatus string, | |
ErrorCode string, | |
BytesSent string, | |
ObjectSize string, | |
TotalTime string, | |
TurnAroundTime string, | |
Referrer string, | |
UserAgent string, | |
VersionId string) | |
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.RegexSerDe' | |
WITH SERDEPROPERTIES ( | |
'serialization.format' = '1', | |
'input.regex' = '([^ ]*) ([^ ]*) \\[(.*?)\\] ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) \\\"([^ ]*) ([^ ]*) (- |[^ ]*)\\\" (-|[0-9]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) (\"[^\"]*\") ([^ ]*)$' | |
) LOCATION 's3://hogemogeTestTest.contoso.com/logs/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment