Selecting an Iceberg table

You see an example of how to read an Apache Iceberg table, and understand the advantages of Iceberg.

Working with timestamps in Iceberg, you do not need to know whether the table is actually partitioned by month, day or hour, based on the timestamp value. You can simply supply a predicate for the timestamp value and Iceberg converts the timestamp to month/day/hour transparently. Hive/Impala must maintain actual partition values in a separate column (for example, ts_month or ts_day). Forgetting to reference the derived partition column in your query can lead to inadvertent full table scans.

By default iceberg.table_identifier is not set in CDP, so you can use the familiar <db_name.<table_name> in queries.

  • You must meet the prerequisites to query Iceberg tables mentioned earlier.
  1. Use a database.
    For example:
    USE mydatabase;
  2. Query an Iceberg table partitioned by city.
    For example:
    SELECT * FROM ice_t2 WHERE city="Bangalore";