Skip to content

Instantly share code, notes, and snippets.

@dbist
Created November 9, 2015 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbist/8ad3861b700aa25f89e0 to your computer and use it in GitHub Desktop.
Save dbist/8ad3861b700aa25f89e0 to your computer and use it in GitHub Desktop.
sample HBase-mapped Hive table with timestamp for column family
CREATE EXTERNAL TABLE hbase_json_table(key string, json string, time timestamp)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:json,:timestamp")
TBLPROPERTIES ("hbase.table.name" = "jsontable");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment