Skip to main content

ALTER SOURCE

Use the ALTER SOURCE command to add columns to the source or modify the name of the source. If your source was created with a schema registry, columns cannot be altered.

Syntax

ALTER SOURCE current_source_name 
{ADD COLUMN col_name data_type | RENAME TO new_source_name} ;

Parameters

Parameter or clauseDescription
current_source_nameThe current name of the source you want to modify.
col_nameThe name of the new column you want to add to the source.
data_typeThe data type of the newly added column. With the struct data type, you can create a nested table. Elements in a nested table need to be enclosed with angle brackets ("<>").
ADD COLUMNIndicates the intention to add a column to the specified source.
RENAME TOIndicates the intention to rename the specified source.
new_source_nameThe new name you want to assign to the source object.

Example

ALTER SOURCE src 
RENAME TO src1;
ALTER SOURCE src1 
ADD COLUMN v3 int;

Help us make this doc better!

Was this page helpful?

Happy React is loading...