Help Center/ MapReduce Service/ Component Operation Guide (LTS)/ Using Hive/ Enterprise-Class Enhancements of Hive/ Configuring Hive to Insert Data to a Directory That Does Not Exist
Updated on 2024-10-25 GMT+08:00

Configuring Hive to Insert Data to a Directory That Does Not Exist

With this function enabled, run the insert overwrite directory /path1/path2/path3... command to write a subdirectory. The permission of the /path1/path2 directory is 700, and the owner is the current user. If the /path3 directory does not exist, it is automatically created and data is written successfully.

This function is supported when hive.server2.enable.doAs is set to true in earlier versions. This version supports the function when hive.server2.enable.doAs is set to false.

Procedure

  1. Log in to FusionInsight Manager. Click Cluster > Services > Hive, click Configurations > All Configurations.
  2. Choose HiveServer(Role) > Customization, add a customized parameter to the hive-site.xml parameter file, set Name to hive.overwrite.directory.move.trash, and set Value to true.
  3. Click Save to save the configuration. Click Instance, select all Hive instances, choose More > Restart Instance, enter the password of the current user, and click OK to restart all Hive instances.