2

I have a Hive external table created from a list of CSV files.

If I perform a Hive delete on a table row (or a number of rows), will the corresponding CSV record/s will be deleted as well?

oikonomiyaki
  • 7,691
  • 15
  • 62
  • 101

1 Answers1

5

As far as I know you can't quite delete a row in Hive -- Hive's not a database, it's a scripting language for Map Reduce. However you could do something like

INSERT OVERWRITE INTO TABLE mytable
SELECT * from mytable 
where rowid <> 1;

In which case yes, the CSV will be updated. Also see the answers to this question How to delete and update a record in Hive

Community
  • 1
  • 1
maxymoo
  • 35,286
  • 11
  • 92
  • 119