在蜂巢中,我们可以更改托管/外部表的位置吗? [英] In hive,can we change location of managed/external table

查看:73
本文介绍了在蜂巢中,我们可以更改托管/外部表的位置吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在配置单元中,我们可以更改托管/外部表的位置吗? 如果是的话.更改位置后,其行为将类似于外部表或内部表

In hive,can we change location of managed/external table if yes how. After changing location will it behave like external table or internal table

推荐答案

我尝试搜索此问题,但没有得到正确的答案 是的,如果我们添加位置

I tried to search this question but I didnt get a proper answer yes we can change the location of managed table if we add location

CREATE TABLE weather (wban INT, date STRING, precip INT)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ‘,’
LOCATION ‘ /hive/data/weather’;

创建后,我们可以通过以下命令更改位置

After creation we can change location by the below command

ALTER (DATABASE|SCHEMA) database_name SET LOCATION hdfs_path

即使我们更改位置,该表也只能用作托管表

Even if we change the location the table will behave as managed table only

这篇关于在蜂巢中,我们可以更改托管/外部表的位置吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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