Description
Supported engines: Presto and SparkSQL
Applicable table: Native Iceberg table and external table.
Purpose: Change the storage path of data table.
Standard Statement
ALTER TABLE table_name [ PARTITION (partition_spec) ] SET LOCATION 'new location';
Parameter
table_name
: Data table name
PARTITION (partition_spec)
: Specify the partitioning column.
partition_col_name: Partitioning column name
partition_col_value: Partitioning column value
'new location'
: New location of the table or partition on Tencent Cloud COS.
Example
ALTER TABLE tbl PARTITION (a='1', b='2') SET LOCATION '/path/to/part/ways';
ALTER TABLE tbl SET LOCATION '/path/to/part/ways';
Was this page helpful?