Adding Partition Data (Only OBS Tables Supported)

Function

After an OBS partitioned table is created, no partition information is generated for the table. Partition information is generated only after you:

The following describes how to use the ALTER TABLE statement to add a partition.

Syntax

1
2
3
4
5
ALTER TABLE table_name ADD [IF NOT EXISTS]
  PARTITION partition_specs1
  [LOCATION 'obs_path1']
  PARTITION partition_specs2
  [LOCATION 'obs_path2'];

Keywords

Parameters

Table 1 Parameters

Parameter

Description

table_name

Table name

partition_specs

Partition fields

obs_path

OBS path

Precautions

Example