Skip to main content

Syntax

alter_option depends on the operation you want to perform on the connection. For all supported clauses, see the sections below.

Clause

CONNECTOR WITH

Added in v2.8.0.
This clause updates alterable connector properties in an existing connection and propagates the changes to dependent sources and sinks. For connector-backed tables that use the connection, RisingWave applies the updated configuration through the underlying source.
Parameter or clauseDescription
CONNECTOR WITHUpdates connector properties in an existing connection without recreating it.
property_nameUse the same format as in CREATE CONNECTION. Currently supported for Kafka connections only. Supported properties: properties.security.protocol, properties.ssl.endpoint.identification.algorithm, properties.ssl.ca.location, properties.ssl.ca.pem, properties.ssl.certificate.location, properties.ssl.certificate.pem, properties.ssl.key.location, properties.ssl.key.pem, properties.ssl.key.password, properties.sasl.mechanism, properties.sasl.username, and properties.sasl.password. Secret references are supported.

Permissions

You must have privilege to alter the connection (the same privilege checks as other ALTER operations on catalog objects).

Behavior

When you run ALTER CONNECTION ... CONNECTOR WITH (...):
  1. Catalog update (atomic): The meta service updates the connection’s stored properties and secret references, and then updates the stored connector options of dependent sources and sinks in the same transaction. For connector-backed tables that use the connection, this updates the underlying source.
  2. Validation: The meta service validates that the altered keys are allowed to be changed online, validates the updated connection, and validates each updated dependent source and sink.
  3. Runtime propagation: The meta service broadcasts a barrier mutation carrying the complete properties for each dependent object. Compute nodes rebuild source readers or sink configurations when they receive the mutation. Running jobs typically pick up the new configuration on the next barrier.

Limitations

  • Only the Kafka connection properties listed above can be altered online. Attempting to change any other property returns an error.
  • To change properties.bootstrap.server, alter the referenced secret first, and then run ALTER CONNECTION ... CONNECTOR WITH (...) to propagate the updated configuration online.
  • ALTER CONNECTION ... CONNECTOR WITH (...) does not support nested CONNECTION references inside the WITH (...) options.

Example

This example shows how to rotate a Kafka broker stored in a secret and update SASL credentials online:
After running these commands, the connector-backed table t_conn continues ingesting with the updated connection configuration without being dropped and recreated.

SET SCHEMA

Parameter or clauseDescription
SET SCHEMAThis clause changes the schema of the connection. To change a connection’s schema, you must also have CREATE privilege on the new schema.
schema_nameSpecify the schema to which you want to change.