A step-by-step procedure describes how to create an Apache Iceberg table from a Hive
or Impala Virtual Warehouse. You see how to access and use the recommended query editor Data Explorer to create an Iceberg table.
In this task, you create an Iceberg table in Cloudera Data Warehouse. In a Virtual
Warehouse, you open Data Explorer, and use Hive or Impala to
create a table.
- You must meet the prerequisites to query Iceberg tables from a Virtual Warehouse
mentioned earlier, including obtaining Ranger access permissions.
-
Log in to the Cloudera Data Warehouse service as a
DWUser.
-
Under the Virtual Warehouses tab, create a new Virtual
Warehouse or select an existing one.
-
In Virtual Warehouse Details page, click Open
Data Explorer (Hue).
-
In the Data Explorer (Hue) page,
select a database.
-
Enter a query to create a simple Iceberg table in the default Parquet
format.
Hive example:
CREATE EXTERNAL TABLE ice_t1 (i int, s string, ts timestamp, d date)
STORED BY ICEBERG;
Impala
example:
CREATE TABLE ice_t2 (i int, s string, ts timestamp, d date)
STORED BY ICEBERG;
In CDP, CREATE EXTERNAL TABLE, and just CREATE TABLE, are valid from Hive. You
use the EXTERNAL keyword from Hive to create the Iceberg table to purge the data
when you drop the table. In CDP, from Impala, you must use CREATE TABLE to
initialize the Iceberg table.
-
Click
to run the query.