Skip to main content

Iceberg functions

Iceberg functions provide utilities for working with Apache Iceberg tables. These functions include table-valued functions for reading Iceberg data and partition transform functions that implement the Iceberg partition transforms specification.

Reading Iceberg data

You can register an Iceberg table in Firebolt’s catalog using CREATE ICEBERG TABLE and then query it like a regular table:
SELECT * FROM my_iceberg_table LIMIT 5;
Alternatively, use the READ_ICEBERG table-valued function to query Iceberg tables ad hoc without registering them:
SELECT * 
FROM READ_ICEBERG(
  LOCATION => 'my_iceberg_location',
  MAX_STALENESS => INTERVAL '30 seconds'
) 
LIMIT 5;

Partition transform functions

Iceberg partition transform functions compute partition values according to the Iceberg specification. These functions can be used in the PARTITION BY clause of CREATE ICEBERG TABLE commands.
SELECT 
  iceberg_year('2025-12-15'::DATE) AS year_partition,
  iceberg_month('2025-12-15'::DATE) AS month_partition,
  iceberg_day('2025-12-15'::DATE) AS day_partition;
Returns:
year_partitionmonth_partitionday_partition
5567120437

Available functions

Table-valued functions: Partition transform functions: