Skip to main content
In RisingWave, you can stream data into Iceberg tables with the built-in Iceberg sink connector. Apache Iceberg is a table format designed to support huge tables. For more information, see Apache Iceberg.

Prerequisites

  • Ensure you already have an Iceberg table that you can sink data to. For additional guidance on creating a table and setting up Iceberg, refer to this quickstart guide on creating an Iceberg table.
  • Ensure you have an upstream materialized view or source that you can sink data from.

Syntax

Parameters

Basic parameters

Use Amazon S3 Tables with the Iceberg sink

You can configure the RisingWave Iceberg sink connector to use Amazon S3 Tables as its catalog. This setup allows RisingWave to sink data into Iceberg tables managed by the AWS native S3 Tables catalog service. To achieve this, specify the rest catalog type within your CREATE SINK statement and include the necessary parameters for SigV4 authentication against the S3 Tables REST API. Required REST Catalog Parameters for S3 Tables: Example CREATE SINK Statement:
Once created, this sink will write data from source_table into the specified Iceberg table (<your-table-name>) within the <your-database-name> database, using Amazon S3 Tables to manage the table’s metadata.

Data type mapping

RisingWave converts RisingWave data types from/to Iceberg according to the following data type mapping table:

Catalog

Iceberg supports these types of catalogs:

Storage catalog

The Storage catalog stores all metadata in the underlying file system, such as Hadoop or S3. Currently, we only support S3 as the underlying file system.
Example

REST catalog

RisingWave supports the REST catalog, which acts as a proxy to other catalogs like Hive, JDBC, and Nessie catalog. This is the recommended approach to use RisingWave with Iceberg tables.
Example

Hive catalog

RisingWave supports the Hive catalog. You need to set catalog.type to hive to use it.
Example

JDBC catalog

RisingWave supports the JDBC catalog.
Example

Glue catalog

PREMIUM EDITION FEATUREThis is a Premium Edition feature. All Premium Edition features are available out of the box without additional cost on RisingWave Cloud. For self-hosted deployments, users need to purchase a license key to access this feature. To purchase a license key, please contact sales team at sales@risingwave-labs.com.For a full list of Premium Edition features, see RisingWave Premium Edition.
RisingWave supports the Glue catalog. You should use AWS S3 if you use the Glue catalog. Below are example codes for using this catalog:
Example

Iceberg table format

Currently, RisingWave only supports Iceberg tables in format v2.

Examples

This section includes several examples that you can use if you want to quickly experiment with sinking data to Iceberg.

Create an Iceberg table (if you do not already have one)

Set create_table_if_not_exists to true to automatically create an Iceberg table. Alternatively, use Spark to create a table. For example, the following spark-sql command creates an Iceberg table named table under the database dev in AWS S3. The table is in an S3 bucket named my-iceberg-bucket in region ap-southeast-1 and under the path path/to/warehouse. The table has the property format-version=2, so it supports the upsert option. There should be a folder named s3://my-iceberg-bucket/path/to/warehouse/dev/table/metadata. Note that only S3-compatible object store is supported, such as AWS S3 or MinIO.

Create an upstream materialized view or source

The following query creates an append-only source. For more details on creating a source, see CREATE SOURCE .
Another option is to create an upsert table, which supports in-place updates. For more details on creating a table, see CREATE TABLE .

Append-only sink from append-only source

If you have an append-only source and want to create an append-only sink, set type = append-only in the CREATE SINK SQL query.

Append-only sink from upsert source

If you have an upsert source and want to create an append-only sink, set type = append-only and force_append_only = true. This will ignore delete messages in the upstream, and to turn upstream update messages into insert messages.

Upsert sink from upsert source

In RisingWave, you can directly sink data as upserts into Iceberg tables.

Iceberg sink on GCS

Added in version 2.3.
RisingWave supports creating Iceberg sinks on GCS with catalog types storage or rest. For more information about gcs.credential, see parameters.