ALTER FOREIGN TABLE (for HDFS or OBS)

Function

ALTER FOREIGN TABLE modifies an HDFS or OBS foreign table.

Precautions

None

Syntax

Parameter Description

For details on how to modify other parameters in the foreign table, such as IF EXISTS, see Parameter Description in ALTER TABLE.

Examples

Change the type of the r_name column to text in the ft_region foreign table.

1
ALTER FOREIGN TABLE ft_region ALTER r_name TYPE TEXT;
Run the following command to mark the r_name column of the ft_region foreign table as not null:
1
ALTER FOREIGN TABLE ft_region ALTER r_name SET NOT NULL;

Links

CREATE FOREIGN TABLE (SQL on OBS or Hadoop), DROP FOREIGN TABLE