Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Hive Combined logs partition

By: zzarbi on Mar 13th, 2012  |  syntax: SQL  |  size: 0.35 KB  |  views: 90  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. CREATE EXTERNAL TABLE raw_datastore (
  2.   ip STRING,
  3.   hyphen STRING,
  4.   username STRING,
  5.   TIME STRING,
  6.   request STRING,
  7.   STATUS INT,
  8.   SIZE INT,
  9.   referrer STRING,
  10.   agent STRING)
  11. PARTITIONED BY(
  12.   YEAR STRING,
  13.   MONTH STRING,
  14.   DAY STRING,
  15.   HOUR STRING)
  16. ROW FORMAT DELIMITED
  17. FIELDS TERMINATED BY '\t'
  18. STORED AS TEXTFILE
  19. LOCATION '/logs';