从 Hive 外部删除行 table
Deleting rows from Hive external table
我有一个从 CSV 文件列表创建的外部 Hive table。
如果我对 table 行(或多行)执行 Hive 删除,相应的 CSV record/s 是否也会被删除?
据我所知,您不能完全删除 Hive 中的行 -- Hive 不是数据库,它是 Map Reduce 的脚本语言。但是你可以做类似
INSERT OVERWRITE INTO TABLE mytable
SELECT * from mytable
where rowid <> 1;
在这种情况下,将更新 CSV。另请参阅此问题的答案
How to delete and update a record in Hive
我有一个从 CSV 文件列表创建的外部 Hive table。
如果我对 table 行(或多行)执行 Hive 删除,相应的 CSV record/s 是否也会被删除?
据我所知,您不能完全删除 Hive 中的行 -- Hive 不是数据库,它是 Map Reduce 的脚本语言。但是你可以做类似
INSERT OVERWRITE INTO TABLE mytable
SELECT * from mytable
where rowid <> 1;
在这种情况下,将更新 CSV。另请参阅此问题的答案 How to delete and update a record in Hive