sql语句结构:
ALTER TABLE table_name RENAME TO new_table_name
rename表有个要求,就是新表名的hdfs路径不能已存在或者下面有文件。不然报错。
报错:
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Unable to alter table. New location for this table hive.${dbname}.${new_table_name} already exists : ${一段hdfs路径}
Visit Hive profile page for more information: ...
在使用Hive的ALTERTABLE语句重命名表时,如果新表名对应的HDFS路径已经存在或包含文件,会遇到ExecutionError。错误信息提到新表的位置冲突。解决此问题需要确保新表名的路径是唯一的。
1914

被折叠的 条评论
为什么被折叠?



