Hive Table Column Mapping

When creating a column mapping in hive all the data is being saved to the metastore.

Example of a hive hbase column mapping:
CREATE EXTERNAL TABLE hivetableName(Col String, Col1 String)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = "colFamily:Col, colFamily:Col")
TBLPROPERTIES("hbase.table.name" = "hbasetableName")

If you use a vast amount of columns that are being mapped the table column of the serde params will reach its limit.

You can fix this problem with the following statement if your metastore uses a mysql database:
ALTER TABLE hive.`SERDE_PARAMS` MODIFY COLUMN `PARAM_VALUE` text;

Categorized: Hive

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>