Migrating stored Hive queries after Unified Analytics removal

Starting with Cloudera Data Warehouse version 1.12.4, the Unified Analytics framework which previously allowed Impala Virtual Warehouses to execute Hive syntax is removed. This change requires a transition of any existing saved queries to the standard Impala engine.

Following the 1.12.4 upgrade, these Virtual warehouses can be reverted to standard Impala instances and the Hive engine is no longer available within them. After upgrading a Unified Analytics Virtual Warehouse to Impala, any queries previously saved as Hive snippets in Hue become incompatible. These saved queries will fail to load or run, triggering the error, Snippet type hive is not configured. This happens because Hue metadata remains linked to the original engine type used during the query creation.

To resolve this issue, use one of the following three methods. Your choice depends on the total number of stored queries and whether their syntax requires manual or batch updates.

  1. If a stored Hive query uses syntax specific only to Hive that is not supported by Impala, it will no longer function in the upgraded Virtual Warehouse.
    1. Navigate to the saved queries folder in Hue.
    2. Select the Hive-specific query.
    3. Delete the query from the system.
  2. For individual queries that use syntax compatible with both Hive and Impala, you can manually update the snippet type.
    1. Open the existing Hive-saved query in the Hue query editor.
    2. Copy the SQL text.
    3. Create a new query snippet and select Impala as the engine type.
    4. Delete the original Hive version of the query.
  3. If you have a large number of saved queries, you can perform a batch update by exporting and editing the query metadata.
    1. Open Hue and navigate to Documents. Select the Hive queries created under Unified Analytics and export them as a JSON file.
    2. Open the exported JSON file in a standard text editor. Use the search-and-replace function to change all instances of type:hive to type: impala.
    3. Create a new query snippet and select Impala as the engine type.
    4. Delete the original Hive version of the query.