How to delete and update a record in Hive

后端 未结 15 1371
梦如初夏
梦如初夏 2020-11-28 19:26

I have installed Hadoop, Hive, Hive JDBC. which are running fine for me. But I still have a problem. How to delete or update a single record using Hive because delete or upd

15条回答
  •  南笙
    南笙 (楼主)
    2020-11-28 20:09

    UPDATE or DELETE a record isn't allowed in Hive, but INSERT INTO is acceptable.
    A snippet from Hadoop: The Definitive Guide(3rd edition):

    Updates, transactions, and indexes are mainstays of traditional databases. Yet, until recently, these features have not been considered a part of Hive's feature set. This is because Hive was built to operate over HDFS data using MapReduce, where full-table scans are the norm and a table update is achieved by transforming the data into a new table. For a data warehousing application that runs over large portions of the dataset, this works well.

    Hive doesn't support updates (or deletes), but it does support INSERT INTO, so it is possible to add new rows to an existing table.

提交回复
热议问题