【问题标题】:Drop Table Hive删除表 Hive
【发布时间】:2018-11-11 14:26:30
【问题描述】:

我需要从 Hive 的镶木地板表 (table_a) 中删除几行。如果我创建一个新表(Table_b),并插入其中:

Insert Overwrite table table_b 
select * from table_a
Where (my conditions to exclude the right fields here)

两个表现在是否使用同一个 HDFS 文件?如果我删除 table_a 并清除,两个表的数据会消失吗?

【问题讨论】:

    标签: hive


    【解决方案1】:

    你可以通过describe formatted <table name>查看表的hdfs路径。

    对于您的问题,如果您在创建表时没有指定任何位置,则表 a 的 hdfs 路径和表 b 的 hdfs 路径会有所不同 如果在将数据加载到表 b 后删除表,则不会丢失表 b 中的数据

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-04-07
      • 2018-05-18
      • 2018-06-27
      • 2019-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多