Altering tables from flat to transactional
Knowing how Hive converts tables from flat to transactional, and being aware of the operations that are supported by the conversion, helps you transition pre-existing tables to Hive 3.
If you have a flat table (a managed, non-transactional table) that you created in release earlier than HDP 3.0, you can convert the table to transactional using an ALTER TABLE statement. Hive changes only metadata, so this operation executes very quickly. Compaction eventually rewrites the table to convert it to ACID format, but it occurs in the background, so you can run update and delete operations on the table immediately after altering it.
Wide feature parity exists between flat and transactional tables as shown in the following list of features supported in transactional tables:
- Add Partition...
- Alter Table
- Alter Table T Concatenate
- Alter Table T Rename To...
- Create Table As...
- Export/Import Table
- Fully Vectorized
- Insert Overwrite
- Into Table...
- LLAP Cache
- Load Data...
- Non-bucketed tables
- Predicate Push Down