Last active
January 2, 2016 09:29
-
-
Save yalisassoon/8283380 to your computer and use it in GitHub Desktop.
Hive table definition to analyze Amazon Cloudfront Access logs
This file contains hidden or 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 cloudfront_access_logs ( | |
dt STRING, | |
tm STRING, | |
x_edge_location STRING, | |
sc_bytes STRING, | |
c_ip STRING, | |
cs_method STRING, | |
cs_host STRING, | |
cs_uri_stem STRING, | |
sc_status STRING, | |
cs_referer STRING, | |
cs_user_agent STRING, | |
cs_uri_query STRING, | |
cs_cookie STRING, | |
x_edge_result_type STRING, | |
x_edge_request_id STRING, | |
x_edge_host_header STRING, | |
cs_protocol STRING, | |
cs_bytes STRING | |
) | |
ROW FORMAT DELIMITED | |
FIELDS TERMINATED BY '\t' | |
LINES TERMINATED BY '\n' | |
STORED AS TEXTFILE | |
LOCATION 's3n://.../' ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment