Syntax
alter_option depends on the operation you want to perform on the source. For all supported clauses, see the sections below.
Clause
ADD COLUMN
- To alter columns in a source created with a schema registry, see REFRESH SCHEMA.
- You cannot add a primary key column to a source or table in RisingWave. To modify the primary key of a source or table, you need to recreate the table.
- You cannot remove a column from a source in RisingWave. If you intend to remove a column from a source, you’ll need to drop the source and create the source again.
CONNECTOR WITH
Added in v2.6.0.
The following connectors and properties are currently supported:
For CDC connectors, only the Debezium runtime tunables above can be altered in place. Connection-level fields such as
hostname, port, database.name, username, and password still require recreating the source. To rotate credentials without changing the SQL definition, store them in a secret and update the secret with ALTER SECRET — note that running CDC jobs only pick up the new value after a restart.Example: Kafka
Example: Postgres CDC
For routine, supported property updates, prefer using
ALTER SOURCE ... CONNECTOR WITH. For advanced operational scenarios (such as updating properties not supported by ALTER SOURCE), you can use low-level risectl commands. These are intended for cluster operators and require direct access to the RisingWave binary. See Update source properties with risectl for details.REFRESH SCHEMA
Fetch the latest schema from the schema registry and update the source schema.
Currently when refreshing the schema registry of a source, it is not allowed to drop columns or change types.
Create a source
Refresh schema
RENAME TO
OWNER TO
SET SCHEMA
SET PARALLELISM
Added in v2.3.0.
SET BACKFILL_PARALLELISM
SET SOURCE_RATE_LIMIT
SOURCE_RATE_LIMIT, refer to How to view runtime parameters.
For a newly created materialized view on a source with historical data e.g. Kafka source, it will backfill from
the source. The backfilling process will not be affected by the
SOURCE_RATE_LIMIT
of the source.To modify the rate limit of the backfilling process, please refer to SET BACKFILL_RATE_LIMIT.Example
Example