Guest User

Untitled

a guest
Jan 16th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. CREATE EXTERNAL TABLE nik.regex_access_log (
  2. ip STRING,
  3. dte STRING,
  4. request_type STRING,
  5. uri STRING,
  6. protocol STRING,
  7. status STRING,
  8. bytes_sent STRING,
  9. referer STRING,
  10. useragent STRING
  11. )
  12. ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'
  13. WITH SERDEPROPERTIES (
  14. 'input.regex'='^(\\S+) \\S+ \\S+ \\[([^\\[]+)\\] "(\\w+) (\\S+) (\\S+)" (\\d+) (\\d+) "([^"]+)" "([^"]+)".*'
  15. )
  16. STORED AS TEXTFILE
  17. LOCATION 's3://nikita-ds-playground/raw/access-log/2018-12-28/';
Add Comment
Please, Sign In to add comment