jgbolger commented on issue #3464: Issue using Oracle DB as superset database - 
Error running a migration script
URL: 
https://github.com/apache/incubator-superset/issues/3464#issuecomment-329750236
 
 
   Hi,
   
   If it helps, I have dockerised this so it should hopefully be 
straightforward to reproduce.
   
   - The Oracle docker image was taken out of the box from 
"wnameless/oracle-xe-11g"
   - The Superset docker image has been customised from "amancevice/superset" 
to include the oracle drivers.
   
   Also - I can confirm that this is all hanging together and that when I use 
the standard SQL Lite database for the superset db, the db upgrade works and I 
can log in as admin and add the Oracle database as a data source and query it 
successfully.
   
   Finally, it is worth mentioning that I am running my Docker instance on 
Windows.
   
   The setup is as follows:
   
   ## ./Dockerfile.superset:
   ```
   FROM amancevice/superset
   
   USER root
   RUN pip install cx_Oracle --upgrade
   RUN apt-get install libaio1
   COPY instantclient_11_2 /lib/oracle_instantclient_11_2
   ENV LD_LIBRARY_PATH="/lib/oracle_instantclient_11_2:${LD_LIBRARY_PATH}"
   
   USER superset
   ```
   
   **Important:** Before you build that image, you need to download the Oracle 
instant client (11G version) from the Oracle website. I downloaded the zip and 
unzipped into the same folder as my docker file.
   URL for download is: 
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
   File name is: instantclient-basiclite-linux-x86-64-11.2.0.2.0.zip
   
   ## ./docker-compose.yml
   ```
   version: '3'
   services:
       oracledb:
           container_name: oracledb
           image: wnameless/oracle-xe-11g
           volumes:
               - ./data/oracle:/docker-entrypoint-initdb.d
           ports:
               - "49161:1521"
               - "49160:22"
               - "8081:8080"
           environment:
               - "ORACLE_ENABLE_XDB=true"
               - "ORACLE_ALLOW_REMOTE=true"
       superset:
           container_name: superset
           image: awp/superset
           volumes:
               - ./data/etc/superset:/etc/superset
           ports:
               - 8088:8088
           links:
               - oracledb
   ```
   
   ## ./data/etc/superset_config.py
   ```
   ROW_LIMIT = 5000
   SUPERSET_WORKERS = 4
   SUPERSET_WEBSERVER_PORT = 8088
   SECRET_KEY = '\2\1thisismyscretkey\1\2\e\y\y\h'
   SQLALCHEMY_DATABASE_URI = 'oracle://XDB:xdb@oracledb:1521/XE'
   WTF_CSRF_ENABLED = True
   DRUID_IS_ACTIVE = False
   DEBUG = True
   ```
   
   
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to