Copy CREATE EXTERNAL TABLE alb_logs.alb_log (
`type` string,
`time` string,
`elb` string,
`client_ip_port` string,
`target_ip_port` string,
`request_processing_time` double,
`target_processing_time` double,
`response_processing_time` double,
`elb_status_code` string,
`target_status_code` string,
`received_bytes` bigint,
`sent_bytes` bigint,
`request_verb` string,
`request_url` string,
`request_http_version` string,
`user_agent` string,
`ssl_cipher` string,
`ssl_protocol` string,
`target_group_arn` string,
`trace_id` string,
`domain_name` string,
`chosen_cert_arn` string,
`matched_rule_priority` string,
`request_creation_time` string,
`actions_executed` string,
`redirect_url` string,
`error_reason` string,
`target_port_list` string,
`target_status_code_list` string,
`classification` string,
`classification_reason` string
)
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.RegexSerDe'
WITH SERDEPROPERTIES (
"input.regex" = "([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) \\\"([A-Z]+) ([^ ]+) ([^\\\"]+)\\\" \\\"([^\\\"]*)\\\" ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*)"
)
LOCATION 's3://your-alb-log-bucket/alb-logs/'
TBLPROPERTIES ('has_encrypted_data'='false');