Created
December 17, 2017 06:37
-
-
Save ashrafuzzaman/b901c11258c9c1e7226cb2572e672dcc to your computer and use it in GitHub Desktop.
Athena cloudfront DDL
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 sampledb.widget_access_log ( | |
`date` date, | |
`time` string, | |
`location` string, | |
`bytes` int, | |
`request_ip` string, | |
`method` string, | |
`host` string, | |
`uri` string, | |
`status` int, | |
`referer` string, | |
`useragent` string, | |
`uri_query` string, | |
`cookie` string, | |
`edge_type` string, | |
`edget_requiest_id` string, | |
`host_header` string, | |
`cs_protocol` string, | |
`cs_bytes` int, | |
`time_taken` string, | |
`x_forwarded_for` string, | |
`ssl_protocol` string, | |
`ssl_cipher` string, | |
`result_type` string, | |
`protocol` string | |
) | |
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.RegexSerDe' | |
WITH SERDEPROPERTIES ( | |
'input.regex' = '^(?!#.*)(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s*(\\S*)' | |
) LOCATION 's3://cloudfront.newscred-dev.com/widgets/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment