Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
Impala 2.1.1
-
None
Description
- Created an hbase table
- Created a hive external table over it and mapped the columns appropriately
The order of columns in hive is ok, but it gets switched in Impala.
Now, when I insert data into it with an Impala query, it switches the data in the columns. moviegenre data goes into movietitle and vice-versa in the example below. It is correct when inserted with HIVE.
CREATE EXTERNAL TABLE hbasemovies ( movieid int, movietitle string, moviegenre string ) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES ( "hbase.columns.mapping" = ":key,details:movietitle,\ details:moviegenre" ) TBLPROPERTIES("hbase.table.name" = "hbasemovies"); INSERT INTO TABLE hbasemovies SELECT movieid, movietitle, moviegenre from movies; 'movies' is an existing table in HIVE/Impala. [localhost:21000] > describe hbasemovies; Query: describe hbasemovies +------------+--------+---------+ | name | type | comment | +------------+--------+---------+ | movieid | int | | | moviegenre | string | | | movietitle | string | | +------------+--------+---------+ Fetched 3 row(s) in 0.01s hive> describe hbasemovies; OK movieid int from deserializer movietitle string from deserializer moviegenre string from deserializer