pyflink.table.catalog.Catalog.alter_table#
- Catalog.alter_table(table_path: pyflink.table.catalog.ObjectPath, new_table: pyflink.table.catalog.CatalogBaseTable, ignore_if_not_exists)[source]#
Modify an existing table or view. Note that the new and old CatalogBaseTable must be of the same type. For example, this doesn’t allow alter a regular table to partitioned table, or alter a view to a table, and vice versa.
- Parameters
table_path – Path
ObjectPath
of the table or view to be modified.new_table – The new table definition
CatalogBaseTable
.ignore_if_not_exists – Flag to specify behavior when the table or view does not exist: if set to false, throw an exception, if set to true, do nothing.
- Raise
CatalogException in case of any runtime exception. TableNotExistException if the table does not exist.