Creating a Virtual Warehouse and creating tables on Ozone

After you configure the Database Catalog to point to the Ozone filesystem, verify that the Hive and Impala Virtual Warehouses in Cloudera Data Warehouse (CDW) carry the right configurations, and then you can managing databases and tables residing in Ozone using Hue or other SQL clients.

Ensure that the Hive MetaStore warehouse directories in the Database Catalog point to the Ozone filesystem on the CDP Private Cloud Base cluster.
  1. Log in to the Data Warehouse service as a DWAdmin.
  2. Create an Impala or Hive Virtual Warehouse.
    Since you have already added Ozone in your base cluster, the required configuration are made available in CDW when you create a Virtual Warehouse.
  3. Verify that the Ozone configurations are present in CDW. From your Virtual Warehouse tile, click > Edit > CONFIGURATIONS > Impala catalogd and select ozone-site from the Configuration files drop-down menu.
    For Hive, click > Edit > CONFIGURATIONS > Hiveserver2 and select ozone-site from the Configuration files drop-down menu.
  4. Use Hue or any other SQL clients to start managing databases, managed and external tables.
    Following is a sample command to create an external table:
    create external table
    [***TABLE-NAME***] (id int, name string)
    location 'ofs://ozone1/s3v/cdw-logs/compute-schal-pvc111-env-1-hive5/warehouse/tablespace/[***TABLE-NAME***]';
  5. Verify that the required keys are created in the bucket by running the following command:
    ozone sh bucket ls [***VOLUME***] -p warehouses/tablespace