let's assume that we have an external Hive table pointing on CSVs files on an hdfs directory.
so what happened when inserting a new line on this table using hive :
- will the insert cause a whole rewrite of the table ?
- or a a whole rewrite of the hdfs block where the data is located in ?
- or will simply append the new line at the end of the file ?
Same question for the update operation
thanks in advance !
INSERT OVERWRITEwill nix all the files in directory then create 1..N new files (one per reducer if theSELECTrequires a reducer step, one per mapper otherwise -- unless you tweak the "merge small files" parameters to reduce fragmentation). And anINSERTwill just add 1..N new files. - Samson Scharfrichter