Created
March 1, 2017 11:12
-
-
Save mdoering/a3e2727ec07ff143f0ed1e532bc8a249 to your computer and use it in GitHub Desktop.
Create occ_extensions_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
USE mdoering; | |
-- Base HBase backed table | |
CREATE EXTERNAL TABLE IF NOT EXISTS mdoering.occ_extensions_hbase ( | |
gbifid INT, | |
dataset_key STRING, | |
protocol STRING, | |
ac_multimedia STRING, | |
gbif_description STRING, | |
gbif_distribution STRING, | |
eol_document STRING, | |
eol_reference STRING, | |
dwc_identification STRING, | |
gbif_identifier STRING, | |
gbif_image STRING, | |
dwc_measurement_or_fact STRING, | |
gbif_multimedia STRING, | |
gbif_reference STRING, | |
dwc_resource_relationship STRING, | |
gbif_species_profile STRING, | |
gbif_types_and_specimen STRING, | |
gbif_vernacular_name STRING | |
) | |
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' | |
WITH SERDEPROPERTIES ("hbase.columns.mapping" = " | |
:key, | |
o:datasetKey, | |
o:protocol, | |
o:v_http_//rs.tdwg.org/ac/terms/Multimedia, | |
o:v_http_//rs.gbif.org/terms/1.0/Description, | |
o:v_http_//rs.gbif.org/terms/1.0/Distribution, | |
o:v_http_//eol.org/schema/media/Document, | |
o:v_http_//eol.org/schema/reference/Reference, | |
o:v_http_//rs.tdwg.org/dwc/terms/Identification, | |
o:v_http_//rs.gbif.org/terms/1.0/Identifier, | |
o:v_http_//rs.gbif.org/terms/1.0/Image, | |
o:v_http_//rs.tdwg.org/dwc/terms/MeasurementOrFact, | |
o:v_http_//rs.gbif.org/terms/1.0/Multimedia, | |
o:v_http_//rs.gbif.org/terms/1.0/Reference, | |
o:v_http_//rs.tdwg.org/dwc/terms/ResourceRelationship, | |
o:v_http_//rs.gbif.org/terms/1.0/SpeciesProfile, | |
o:v_http_//rs.gbif.org/terms/1.0/TypesAndSpecimen, | |
o:v_http_//rs.gbif.org/terms/1.0/VernacularName | |
") TBLPROPERTIES( | |
"hbase.table.name" = "prod_a_occurrence", | |
"hbase.table.default.storage.type" = "binary" | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment