I have hive table like below
create external table transaction(
id int,
name varchar(60))
month string
)
PARTITIONED BY (
year string,
transaction_type_code varchar(20)
)
STORED AS PARQUET
LOCATION 'hdfs://xyz';
I am creating one more external table with one more partition column dt
like below
create external table transaction_copy(
id int,
name varchar(60))
month string
)
PARTITIONED BY (
dt string,
year string,
transaction_type_code varchar(20)
)
STORED AS PARQUET
LOCATION 'hdfs://xyz';
Adding partition like below
alter table transaction_copy add if not exists partition (dt='20210811') LOCATION 'hdfs://xyz';
Getting below exception
ERROR: Error while compiling statement: FAILED: ValidationFailureSemanticException partition spec {dt=20210810} doesn't contain all (3) partition columns
I am able to add partition by passing all 3 partitions .
Is it also possible by passing only one partition?