为什么配置单元不允许使用CTAS创建外部表? [英] Why hive doesn't allow create external table with CTAS?

查看:107
本文介绍了为什么配置单元不允许使用CTAS创建外部表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在蜂巢中,通过CTAS创建外部表是一个语义错误,为什么? CTAS创建的表是原子表,而外部表意味着删除表时不会删除数据,它们似乎没有冲突.

In hive, create external table by CTAS is a semantic error, why? The table created by CTAS is atomic, while external table means data will not be deleted when dropping table, they do not seem to conflict.

推荐答案

我在这里缺少什么吗?

尝试一下...您应该能够使用CTAS创建外部表.

Try this...You should be able to create an external table with CTAS.

CREATE TABLE ext_table LOCATION '/user/XXXXX/XXXXXX' 
AS SELECT * from managed_table;

我能够创建一个.我正在使用0.12.

I was able to create one. I am using 0.12.

这篇关于为什么配置单元不允许使用CTAS创建外部表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆