In case my table in hbase has 3 versions and I have integrated ahive table to this hbase table. Then how do I read only latest version of the records from the hive table?
Hbase-Hive integrated table only shows latest version of the record and we are not able to query any version rather than latest version from hive table.
Hbase overwrites the existing data when we are writing same rowkey again to hbase table and if rowkey doesn't exists then inserts into table
if you want to see old versions in hbase table, then you need to specify versions in your scan command and we need to create (or) alter hbase table to store the versions.
hbase(main):> create 't2', {NAME => 'f2', VERSIONS => 10} //create table with 10 versions
hbase(main):> alter 't2',{NAME=>'f2',VERSIONS=>10} //alter already create hbase table to 10 versions
hbase(main):> scan 't2',{VERSIONS=>10} //scan hbase table for 10 versions