Hey fayol and others who have stumbled upon this thread trying to configure Oracle for Redash but not having any luck. After using this post as a guideline and doing some troubleshooting I finally got redash working with oracle! Here is what I did below so that you can replicate it/use it to get Oracle working with Redash yourself.
I'm going to make some general assumptions that you are using a redash AMI and that you have properly installed the oracle client on the AMI (I personally recommend using the rpm, but the zip file works as well as long as you reference the correct path). For my case, I installed oracle client 188.8.131.52 with the basic, SDK, and SQL plus packages.
Here's where it can get tricky, as of my post now, Redash uses the cx_Oracle module 5.2 which if you run the command "import cx_Oracle" after using "python pip -m install cx_Oracle" you will get the latest version which is cx_Oracle 6.0. Personally, I could not get this version to work with my environment and got the error “DPI-1054: connection cannot be closed when open statements or LOBs exist” which is specific to cx_Oracle release 6.0. The workaround is to download cx_oracle version 5.2 from the link I provide here: https://pypi.python.org/packages/46/a3/59c2510c3c3440db528b74887ed869b557fb6e17a8398ca4e5caee64f377/cx_Oracle-5.2.tar.gz#md5=6a49e1aa0e5b48589f8edfe5884ff5a5
Then once downloaded, use the command tar -zxvf cx_Oracle-5.2.tar.gz to access the cx_Oracle repository.
cd to cx_Oracle-5.2/ and run the command sudo python setup.py build && sudo python setup.py install (Ignore any warning messages or other messages generated here). Also, note that if you have already installed the cx_Oracle package it will give you an error when trying to install the new package on top. My advice is to uninstall cx_Oracle and reinstall with 5.2.
Another interesting thing to note is that building the cx_Oracle 5.2 version will require the use of a python egg cache folder for redash to use to store metadata. I created one in the /tmp/ directory using sudo mkdir python-eggs. NOTE* You must also give this directory the correct permissions for redash to have write permissions. Use chmod for this.
Now you are almost finished configuring your environment to use Oracle! cd to the /opt/redash directory and use sudo nano .env to edit the environment variables. You will need to export the LD_LIBRARY_PATH, PYTHON_EGG_CACHE directory and the REDASH_ADDITIONAL_QUERY_RUNNERS. Below is what I added in my .env file.
Now simply restart the service using sudo supervisorctl restart all and log into your redash AMI. Put in the correct database information for your Oracle database and viola! You should now be able to test connection, and it should be successful!
If it is not successful, or if you are getting a 502 bad gateway error, check the log files using sudo tail -F /var/log/supervisor/*.log for further info.