Creating an Ozone-based external table
You use the LOCATION clause in the CREATE EXTERNAL TABLE statement to create an external table having source data in Ozone.
- If you are running an insecure cluster, ensure that you set up the necessary policies and permissions in Ranger to give user access to Hive external files in Ozone.
- You must have created a volume and bucket in Ozone. For
example:
ozone sh volume create vol1 ozone sh bucket create vol1/bucket1
- It is recommended that you set certain Hive configurations before querying Hive tables in Ozone.
- For the Hive Table creation, the warehouse directory must be set at bucket level or directory level under the hive.metastore.warehouse.dir or hive.metastore.warehouse.external.dir parameters. For more information, see Changing the Hive warehouse location.