Want more features on Pastebin? Sign Up, it's FREE!
Guest

Hive external table for twitter hashtags

By: a guest on Nov 20th, 2012  |  syntax: SQL  |  size: 0.25 KB  |  views: 296  |  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 tweets (
  2.  entities STRUCT<
  3.    urls:ARRAY<STRING>,
  4.    user_mentions:ARRAY<STRING>,
  5.    hashtags:ARRAY<STRUCT<text:STRING,indicies:STRING>>>
  6. )
  7. ROW FORMAT SERDE 'com.cloudera.hive.serde.JSONSerDe'
  8. LOCATION '/path/to/your/twitter-json/';
clone this paste RAW Paste Data