0

I'm a bit confused by the behaviour of create external table in Hive.

If I do the following:

CREATE EXTERNAL TABLE hive_hbase_table ( key INT,
name map<STRING,STRING>,
info map<STRING,STRING>)
STORED BY 'org.apache.hadoop.hive.hbase. HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,CustomerName:,ContactInfo:")
TBLPROPERTIES ("hbase.table.name" = "customerinfo");

would I be right in thinking that no data is loaded into the table? Rather, the external table merely acts as a view onto the underlying table?

Is this always the case with 'external table', or is this just because I have said 'stored by' and haven't used a 'load' command?

Thanks!

user384842
  • 1,946
  • 3
  • 17
  • 24

1 Answers1

0

you can find the Difference between Hive internal tables and external tables in this link. There is no data loaded into the table. Now concerning

STORED BY 'org.apache.hadoop.hive.hbase. HBaseStorageHandler' 

Use the HBaseStorageHandler to register HBase tables with the Hive metastore. You can optionally specify the HBase table as EXTERNAL, in which case Hive will not create to drop that table directly – you’ll have to use the HBase shell to do so. Hope that my answer helps you

Community
  • 1
  • 1