Truncate Hive target tables to delete the table contents. You can truncate internal and external Hive tables in the Hadoop environment.
Truncate a Hive table in the Hive table properties. The following image shows the Hive table properties:
To truncate the entire Hive table, choose the option to truncate the target table.
To truncate only the partitions in the Hive table for which the transformation received input data, you must choose to truncate the target table and to truncate the partition in the Hive target table.
You must choose both "Truncate target table" and "Truncate target partition" options due to the possibility that input data might affect all partitions and cause the whole table to be truncated.
You can design a mapping to truncate an internal or external Hive table that is bucketed and partitioned.
Consider the following restrictions when you truncate a Hive table in a mapping that runs in the Hadoop environment:
The Data Integration Service can truncate the partition in the Hive target in which the data is being inserted.
You must truncate the target table to overwrite data to a Hive table with Hive version 0.7. The Data Integration Service ignores write, update override, delete, insert, and update strategy properties when it writes data to a Hive target.