impala无法删除外部表

b5buobof  于 2021-06-26  发布在  Impala
关注(0)|答案(1)|浏览(747)

我使用错误(不存在)路径创建了一个外部表:

create external table IF NOT EXISTS ds_user_id_csv
(
    type string,
    imei string,
    imsi string,
    idfa string,
    msisdn string,
    mac string
)
PARTITIONED BY(prov string,day string)
ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
stored as textfile
LOCATION 'hdfs://cdh0:8020/user/hive/warehouse/test.db/ds_user_id';

我不能丢掉table:

[cdh1:21000] > drop table ds_user_id_csv
         > ;
Query: drop table ds_user_id_csv
ERROR:
ImpalaRuntimeException: Error making 'dropTable' RPC to Hive Metastore:
CAUSED BY: MetaException: java.lang.IllegalArgumentException: Wrong FS: hdfs://cdh0:8020/user/hive/warehouse/test.db/ds_user_id, expected: hdfs://nameservice1

那么如何解决这个问题呢?谢谢您。

zc0qhyus

zc0qhyus1#

使用以下命令更改位置

ALTER TABLE name ds_user_id_csv SET LOCATION '{new location}';

相关问题