Created
November 14, 2014 17:38
-
-
Save mwinkle/088ae96295b1affaa6b7 to your computer and use it in GitHub Desktop.
Hive Table in Hbase
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 reverse_ip_hbase ( | |
rowkey STRING, | |
IpAddress string, | |
Continent string, | |
Country string, | |
CountryIso2 string, | |
CountryConfidence INT, | |
Region string, | |
State string, | |
StateConfidence INT, | |
City string, | |
CityConfidence INT, | |
Latitude DOUBLE, | |
Longitude DOUBLE, | |
RegisteringOrganizationName STRING, | |
CarrierId string, | |
CarrierName string | |
) | |
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' | |
WITH SERDEPROPERTIES ('hbase.columns.mapping' = | |
':key,cf1:IpAddress, | |
cf1:Continent,cf1:Country,cf1:CountryIso2,cf1:CountryConfidence, | |
cf1:Region,cf1:State,cf1:StateConfidence,cf1:City, | |
cf1:CityConfidence,cf1:Latitude,cf1:Longitude, | |
cf1:RegisteringOrganizationName,cf1:CarrierId,cf1:CarrierName') | |
TBLPROPERTIES ('hbase.table.name' = 'reverse_ip'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment