tencent cloud

Data Lake Compute

ALTER TABLE SET LOCATION

Download
Focus Mode
Font Size
Last updated: 2024-08-07 17:17:49

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';




Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback