Last active
December 20, 2016 12:28
-
-
Save kerbelp/5507b18a0efbee20d12471e451fee97a 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 elb_logs_raw ( | |
request_timestamp string, | |
elb_name string, | |
request_ip string, | |
request_port int, | |
backend_ip string, | |
backend_port int, | |
request_processing_time double, | |
backend_processing_time double, | |
client_response_time double, | |
elb_response_code string, | |
backend_response_code string, | |
received_bytes bigint, | |
sent_bytes bigint, | |
request_verb string, | |
url string, | |
protocol string, | |
user_agent string, | |
ssl_cipher string, | |
ssl_protocol string | |
) | |
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.RegexSerDe' | |
WITH SERDEPROPERTIES ( | |
'serialization.format' = '1','input.regex' = '([^ ]*) ([^ ]*) ([^ ]*):([0-9]*) ([^ ]*):([0-9]*) ([.0-9]*) ([.0-9]*) ([.0-9]*) (-|[0-9]*) (-|[0-9]*) ([-0-9]*) ([-0-9]*) \\\"([^ ]*) ([^ ]*) (- |[^ ]*)\\\" (\"[^\"]*\") ([A-Z0-9-]+) ([A-Za-z0-9.-]*)$' ) | |
LOCATION 's3://atom-elb-access-logs/AWSLogs/elasticloadbalancing/us-east-1/'; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment