hadoop - Create external table but warehose empty? -
i using hive v0.13
my data stored in hdfs, use create "create external table"
create table data. works fine, can issue "select"
statements. question under warehouse directory (hive.metastore.warehouse.dir)
, don't see files/data
added, normal? know "external"
table data not copy warehouse directory shouldn't there table meta data stored under there?
when create internal table hive creates directory table name under directory have specified in hive.metastore.warehouse.dir
. me /apps/hive/warehouse.
suppose have created table name test_tbl
there directory /apps/hive/warehouse/test_tbl
and hive store metadata mysql or configured rdbms store metadata.and when load data using load data inpath
command directory.
but in external table
specify location in create statement hence hive doesn't create directory in default warehouse directory because have provided location. store metadata information in rdbms
you can directly load data location using hdfs dfs -put
command , hive treat data table associated particular directory. hence expected behavior external table.
Comments
Post a Comment