tencent cloud

Data Lake Compute

ALTER TABLE DROP PARTITION FIELD

Download
フォーカスモード
フォントサイズ
最終更新日: 2025-12-25 11:51:49

説明

サポートカーネル:Presto、SparkSQL。
適用テーブル範囲:ネイティブIcebergテーブル、外部テーブル。
用途:データテーブルの特定のパーティションフィールドを削除します。

標準構文

ALTER TABLE table_name ADD PARTITION partition_column | hidden_partition_spec

hidden_partition_spec:
Supported transformations are:
years(ts): partition by year
months(ts): partition by month
days(ts) or date(ts): equivalent to dateint partitioning
hours(ts) or date_hour(ts): equivalent to dateint and hour partitioning
bucket(N, col): partition by hashed value mod N buckets
truncate(L, col): partition by value truncated to L
Strings are truncated to the given length
Integers and longs truncate to bins: truncate(10, i) produces partitions 0, 10, 20, 30, …

パラメータ説明

table_name:必要なテーブル名。
partition_column:パーティション列。

ALTER TABLE prod.db.sample DROP PARTITION FIELD catalog
ALTER TABLE prod.db.sample DROP PARTITION FIELD bucket(16, id)
ALTER TABLE prod.db.sample DROP PARTITION FIELD truncate(data, 4)
ALTER TABLE prod.db.sample DROP PARTITION FIELD years(ts)
ALTER TABLE prod.db.sample DROP PARTITION FIELD shard

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック