Create an internal Iceberg table
Creating and using an internal Iceberg table is a two-step process: first, you define the storage and catalog details in aCONNECTION object, and then you create the table itself.
Step 1: Create an Iceberg Connection
An IcebergCONNECTION defines the catalog and object storage configuration.
You must specify the type and warehouse.path parameters, along with the required parameters for your catalog and object storage. To use the JDBC-based built-in catalog, set hosted_catalog to true.
commit_checkpoint_interval and commit_checkpoint_size_threshold_mb are configured on the table or sink WITH (...) properties (for example, CREATE TABLE ... ENGINE = iceberg WITH (...)), not on the CONNECTION object itself. In the default configuration, Iceberg commits happen about every 60 seconds (commit_checkpoint_interval = 60).
You can also set commit_checkpoint_size_threshold_mb to trigger early commits based on buffered data size. When uncommitted write data exceeds this threshold (in MB), RisingWave commits at the next checkpoint barrier regardless of commit_checkpoint_interval. This value must be greater than 0; the default is 128 MB. This is especially useful during large backfills to avoid accumulating too much uncommitted data.
When you create a CONNECTION, you specify the object storage backend where the table data will be stored. You also specify the catalog that will manage the table’s metadata.
For S3 credentials (applies to all catalogs):
- If
enable_config_load = false: you must provides3.access.keyands3.secret.key(you may also sets3.iam_role_arn). - If
enable_config_load = true: don’t provides3.access.key/s3.secret.key(you may sets3.iam_role_arn, or rely on the role already available in your environment/config).
- Built-in catalog
- JDBC catalog
- Glue catalog
- REST catalog
- S3 Tables catalog
Step 2: Create an internal Iceberg table
Create an internal Iceberg table using theENGINE = iceberg clause.
To create Iceberg tables, RisingWave needs to know which Iceberg CONNECTION to use (this connection contains both the object storage settings and the catalog settings). Choose one option below.
WITH clause to optimize query performance.
bucket(n, column) or truncate(n, column). The partition key must be a prefix of the primary key.
Work with internal tables
Once created, you can work with an internal Iceberg table using familiar SQL (insert, query, materialized views). One important difference: new writes become queryable only after an Iceberg commit. By default, Iceberg commits happen about every 60 seconds (controlled bycommit_checkpoint_interval), or earlier when the buffered write size exceeds commit_checkpoint_size_threshold_mb (default: 128 MB).
Ingest data
You can ingest data using standardINSERT statements or by streaming data from a source using CREATE SINK ... INTO.
Query data
Query the table directly withSELECT or use it as a source for a materialized view.
Time travel
Time travel queries work on committed Iceberg snapshots. Make sure at least one Iceberg commit has happened before using these queries.Partition strategy
RisingWave’s Iceberg table engine supports table partitioning using thepartition_by option. Partitioning helps organize data for efficient storage and query performance. You can partition by one or multiple columns, separated by commas, and optionally apply a Transform function to each column to customize partitioning.
Supported transformations include identity, truncate(n), bucket(n), year, month, day, hour, and void. For more details on Iceberg partitioning, see Partition transforms.
Query storage selection
Iceberg engine tables have two storage backends for batch reads:- Iceberg columnar storage – better for wide scans and analytical reads.
- Hummock row storage – better for point reads and highly selective access.
SELECT uses with the iceberg_query_storage_mode session variable.
| Value | Behavior |
|---|---|
iceberg (default) | Always read from Iceberg columnar storage. |
hummock | Always read from Hummock row storage. |
auto | Let the optimizer decide. Currently prefers Hummock for point lookups on the table primary key. |
iceberg_query_storage_mode only affects batch SELECT on tables created with ENGINE = ICEBERG. Streaming queries are not affected.Table maintenance
To maintain good performance and manage storage costs, internal Iceberg tables require periodic maintenance, including compaction and snapshot expiration. RisingWave provides both automatic and manual maintenance options. For complete details, see the Iceberg table maintenance guide.External access
Because internal tables are standard Iceberg tables, they can be read by external query engines like Spark or Trino using the same catalog and storage configuration. Spark Example:Limitations
- Advanced schema evolution operations are not yet supported.
- To ensure data consistency, only RisingWave should write to internal Iceberg tables.