(Optional) Upgrading cx_Oracle to 6.4.1

Perform this step only if you are upgrading to CDP 7.1.7 from an earlier CDP release or from CDH 5.x or 6.x. CDH and previous CDP versions are shipped with cx_Oracle version 5.2.1. You must upgrade cx_Oracle to 6.4.1 to use Oracle database 12c or higher and Oracle Instant Client 12.x and higher, including 19c.

The minimum compatible cx_Oracle version that you can use with Hue is 6.4.1, which is included with CDP 7.1.7 and higher. If you are on an older version of CDP, or if you are upgrading to CDP from CDH 5.x or 6.x, then you must upgrade cx_Oracle from 5.2.1 to 6.4.1.

  1. SSH into the Hue server host.
  2. Change directory to /opt/cloudera/parcels/CDH-7.x/lib/hue.
    cd /opt/cloudera/parcels/CDH-7.x/lib/hue
  3. Check the cx_Oracle version by running the following command:
    ./build/env/bin/pip list | grep cx-Oracle
  4. Ensure that $ORACLE_HOME and $LD_LIBRARY_PATH are properly set so that pip can install the right version.
    echo $ORACLE_HOME $LD_LIBRARY_PATH
    $ORACLE_HOME=/opt/cloudera/parcels/ORACLE_INSTANT_CLIENT/[***INSTANT-CLIENT-WITH-VERSION***]
    
    $LD_LIBRARY_PATH=/opt/cloudera/parcels/ORACLE_INSTANT_CLIENT/[***INSTANT-CLIENT-WITH-VERSION***]
  5. If the cx_Oracle version is lower than 6.4.1, then install the 6.4.1 as follows:
    ./build/env/bin/pip install cx-Oracle==6.4.1
  6. Check the cx_Oracle version by running the following command:
    ./build/env/bin/pip list | grep cx-Oracle
    If the cx_Oracle version is 6.4.1, then you can move to the next step of connecting the Oracle database to Hue.