Skip to main content

Syntax

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

Clauses

ADD COLUMN

  • If your table is defined with a schema registry, you can change the table schema by ALTER TABLE t REFRESH SCHEMA or ALTER TABLE ADD COLUMN.
  • Columns added by this command cannot be used by any existing materialized views or indexes. You must create new materialized views or indexes to reference it.

DROP COLUMN

  • If your table is defined with a schema registry, you can change the table schema by ALTER TABLE t REFRESH SCHEMA or ALTER TABLE DROP COLUMN.
  • You cannot drop columns referenced by materialized views or indexes.
  • To drop a column referenced by a generated column, you must first drop the generated column.

OWNER TO

After setting, you can observe the parallelism status within the internal rw_table_fragments table.

SET SCHEMA

SET PARALLELISM

Here is a more detailed example for you to practise this clause: First, let’s set the parallelism to 3 by the SET command.
Then let’s create a table to view the parallelism we set. As mentioned, the parallelism status of a table can be observed within the rw_fragments table.
Now we can use SET PARALLELISM to change the parallelism and view the change:

SWAP WITH

RENAME TO

REFRESH SCHEMA

This command alters the schema registry of a table created with connectors.
If a downstream fragment references a column that is either missing or has undergone a type change in the updated schema, the command will be declined.

SET SOURCE_RATE_LIMIT

For tables with connector, this statement controls the rate limit of the associated source. For the specific value of SOURCE_RATE_LIMIT, refer to How to view runtime parameters.
Example
Example
Example

SET BACKFILL_RATE_LIMIT

For CDC table created from a CDC source, this statement controls the rate limit of backfilling from the CDC database. For the specific value of BACKFILL_RATE_LIMIT, refer to How to view runtime parameters.
Examples