A step-by-step procedure describes how to create an Apache Iceberg table from a
client connection to Hive or Impala, or from Hue in Data Hub. You see how to access and use
the query editor Hue to create an Iceberg table.
In this task, from a Data Hub cluster, you open Hue, and use Hive or Impala to
create a table.
- You must meet the prerequisites to query Iceberg tables, including obtaining
Ranger access permissions.
-
Log into CDP, and click Data Hub.
-
Click Hue.
-
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.