Hive table locations

You need a little information about the location of your Hive tables in CDP Public Cloud, which you can control. The location depends on the table type that you can determine by running a Hive query.

In CDP Public Cloud, you specify the location of managed tables and external table metadata in the Hive warehouse during Data Warehouse setup. Hive metastore properties hive.metastore.warehouse.dir and hive.metastore.warehouse.external.dir set the storage locations for Hive tables. For example:
  • hive.metastore.warehouse.external.dir = s3a://bucketName/warehouse/tablespace/external/hive
  • hive.metastore.warehouse.dir=s3a://bucketName/warehouse/tablespace/managed/hive
In Cloudera Manager, when you launch your cluster, you accept default or specify other Hive metastore variables hive.metastore.warehouse.dir and hive.metastore.warehouse.external.dir that determine storage locations for Hive tables. Managed tables reside in the managed tablespace, which only Hive can access. By default, Hive assumes external tables reside in the external tablespace.

To determine the managed or external table type, you can run the DESCRIBE EXTENDED table_name command.