Creating an Iceberg table

You create Iceberg tables from Impala from the command line or from Hue. See how to use the Impala shell to query Iceberg files from the Impala command line.

When you connect to an impalad running on the same machine, the prompt reflects the current hostname.
$ impala-shell 
When you connect to an impalad running on a remote machine, and impalad listens on a non-default port over the HTTP HiveServer2 protocol.
$ impala-shell -i some.other.hostname:port_number --protocol='hs2-http' 
You must meet the prerequisites to query Iceberg tables, including obtaining Ranger access permissions.
  1. Note the name of the host running the impalad daemon in your CDP cluster.
    If impalad uses a non-default port (something other than port 21050) for impala-shell connections, also note the port number.
  2. Use the -i option to connect to impalad.
    impala-shell -i <hostname:port number> --protocol='hs2-http' 
  3. Enter a query to create a simple Iceberg table in the default Parquet format.
    CREATE TABLE ice_t2 (i int, s string, ts timestamp, d date)
    STORED BY ICEBERG;