SELECT statements just like a managed table, without needing to use the READ_ICEBERG table-valued function.
The table’s schema is automatically inferred from the Iceberg metadata at creation time. Firebolt reads the Iceberg catalog to determine column names and types.
To export data from Firebolt into a new Iceberg table, use
CREATE ICEBERG TABLE AS SELECT instead.Syntax
Parameters
| Parameter | Description |
|---|---|
<table_name> | An identifier that specifies the name of the table. This name must be unique within the database. |
<column_name> | An identifier that specifies the name of a column. |
<column_type> | Specifies the data type for the column. Must match the types inferred from the Iceberg metadata. |
<location_name> | The name of an Iceberg LOCATION object that points to the Iceberg table in external storage. |
Examples
Creating an Iceberg table
The following example creates aLOCATION pointing to an Iceberg table in S3, then creates an Iceberg table that you can query directly.
Querying an Iceberg table
Once created, an Iceberg table can be queried like any other table in Firebolt:Dropping an Iceberg table
Iceberg tables are dropped using the standardDROP TABLE command. Dropping an Iceberg table removes it from Firebolt’s catalog but does not delete the underlying data in external storage.
CASCADE:
Comparison with other approaches
Firebolt provides multiple ways to work with Iceberg data:| Approach | Use case |
|---|---|
CREATE ICEBERG TABLE (this page) | Register an external Iceberg table in Firebolt’s catalog so it can be queried like a regular table. |
READ_ICEBERG | Query an Iceberg table ad hoc using a table-valued function, without registering it in the catalog. |
CREATE ICEBERG TABLE AS SELECT | Export data from Firebolt into a new Iceberg table in external storage. |
Remarks
- The
LOCATIONmust reference an Iceberg source (SOURCE = ICEBERG). Using a non-Iceberg location will result in an error. - The table schema must be specified explicitly in the
CREATEstatement and must be compatible with the schema in the Iceberg metadata. - All Firebolt query optimizations for Iceberg tables apply, including caching, pruning, and co-located joins.
- Iceberg tables support aggregating indexes, which can be created with
CREATE AGGREGATING INDEXto accelerate repeated aggregation queries. - Firebolt can automatically collect Automated Column Statistics (ACS) for Iceberg tables, enabling the query planner to generate more efficient execution plans.
Limitations
- DML operations (
INSERT,UPDATE,DELETE) on Iceberg tables are not supported. The table is read-only from Firebolt’s perspective. CREATE OR REPLACEis not supported for Iceberg tables.IF NOT EXISTSis not supported for Iceberg tables.- Only Iceberg
LOCATIONobjects are supported. The location must point to a valid Iceberg catalog.