Enabling stored procedures for Hive in DataHub

To create, edit, and drop procedures and functions that are written in Hive Hybrid Procedural SQL (HPL/SQL) using the Hue query editor, you must enable the hplsql option in the Hue Advanced Configuration Snippet.

  1. Log in to the CDP web interface as an Administrator.
  2. Go to Management Console > Environments, select your environment and go to the Data Lake tab.
  3. Click on the CM URL to open Cloudera Manager.
  4. Go to Clusters > Hue > Configuration and add the following lines in the Hue Service Advanced Configuration Snippet (Safety Valve) for hue_safety_valve.ini field:
    [notebook]
      [[interpreters]]
        [[[hive]]]
          name=Hive
          interface=hiveserver2
        [[[hplsql]]]
          name=Hplsql
          interface=hiveserver2
  5. Click Save Changes.
  6. Restart the Hue service.
  7. Go to Clusters > Hive on Tez > Configuration and add the following property name and its value in the Hive Service Advanced Configuration Snippet (Safety Valve) for hive-site.xml field:
    Name: hive.security.authorization.sqlstd.confwhitelist.append
    Value: QUERY_EXECUTOR|HPLSQL
  8. Click Save Changes.
  9. Restart the Hive on Tez service.