I have an external table in hive partitioned by year, month, day. So I dropped one partition but I still see it in show partitions.
>use test_raw_tables;
>show partitions test1_raw;
[year=2016/month=01/day=01]
[year=2017/month=03/day=24]
> alter table test1_raw drop partition (year=2016, month=01, day=01);
> refresh test1_raw;
> show partitions test1_raw;
[year=2016/month=01/day=01]
[year=2017/month=03/day=24] ---Still see the dropped partition here----
> msck repair table test1_raw;
> show partitions test1_raw;
[year=2016/month=01/day=01]
[year=2017/month=03/day=24] ---Still see the dropped partition here----
Running from impala with hive as engine.
describe test1_raw col_name,data_type,comment ('amount_hold', 'int', '') ('id', 'int', '') ('transaction_id', 'string', '') ('recipient_id', 'string', '') ('year', 'string', '') ('month', 'string', '') ('day', 'string', '') ('', None, None) ('# Partition Information', None, None) ('# col_name ', 'data_type ', 'comment ') ('', None, None) ('year', 'string', '') ('month', 'string', '') ('day', 'string', '') location 'hdfs://localhost/sys/datalake/testing/test1_raw'
What is the problem here? The data in hdfs is deleted for that partition after dropping it. Cannot figure out the issue.
refresh
is as Impala command, not hive. I need to know what are you executing from where as well as the table definition, including the relevant partitions definition. Please also show me how their paths looks like in the file system. – David דודו Markovitz