How it works
When you enable the hosted catalog in an Iceberg connection, RisingWave utilizes its internal metastore (which is typically a PostgreSQL instance) to function as a standard Iceberg JDBC Catalog.- Table metadata for tables created with the
ENGINE = iceberg
clause is stored within two system views in RisingWave:iceberg_tables
andiceberg_namespace_properties
. - This implementation is not a proprietary format; it adheres to the standard Iceberg JDBC Catalog protocol.
- This ensures that the tables remain open and accessible to external tools like Spark, Trino, and Flink that can connect to a JDBC catalog.
Create a connection with the hosted catalog
To use the hosted catalog, you create an Iceberg connection and set thehosted_catalog
parameter to true
.
Syntax
Parameters
Field | Description |
---|---|
hosted_catalog | Required. Set to true to enable the Hosted Iceberg Catalog for this connection. This instructs RisingWave to manage the catalog metadata internally. |
warehouse.path | Required. The S3 path to your Iceberg warehouse, where table data and metadata will be stored. |
s3.region | Required. The AWS region of your S3 bucket. |
s3.access.key | Required. The Access Key ID for your IAM user. For enhanced security, you can use secrets. |
s3.secret.key | Required. The Secret Access Key for your IAM user. For enhanced security, you can use secrets. |
s3.endpoint | Optional. The S3-compatible object storage endpoint. |
Example: Creating and using a table
Here is a complete walkthrough of creating a connection, setting it as the default for the Iceberg engine, and creating a table.Step 1: Create the connection
Create an Iceberg connection with the hosted catalog enabled.Step 2: Set the active connection
Configure the Iceberg table engine to use the connection you just created.Step 3: Create and populate the table
Now you can create a table usingENGINE = iceberg
. RisingWave will use the hosted catalog to manage its metadata.
Accessing the hosted catalog from external tools
Since the hosted catalog is a standard JDBC catalog, you can connect external query engines to read the tables managed by RisingWave.Authentication and authorization
External tools can connect to the hosted catalog using a RisingWave database user account and password. The SELECT privileges of the user account determine which Iceberg tables can be accessed.Schema mapping
When accessing the tables from an external tool, use the following mapping between Iceberg and RisingWave naming conventions:Iceberg | RisingWave |
---|---|
catalog name | database name |
namespace | schema |
table | table |
Example: Connecting with Spark
You can configure a Spark session to read thet_hosted_catalog
table created in the example above. In this Spark SQL command, assume the table was created in the RisingWave database named dev
and schema public
.
catalog.namespace.table
):
Inspecting the catalog within RisingWave
You can query the system viewsiceberg_tables
and iceberg_namespace_properties
directly in RisingWave to see the catalog’s metadata. The catalog exposed by RisingWave is read-only.